lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Roy Klein" <>
Subject Update performance/indexwriter.delete()?
Date Thu, 14 Apr 2005 13:39:43 GMT

I've got an application that will be doing constant updates to an index.
I've looked into batching those updates, however, based on the way the
application works, the updates can't be batched. (Well, I figure with a lot
of work, I might be able to batch ~10% of the transactions) Another
requirement of my application is that the index needs to be updated
synchronously (i.e. a given thread will update a document, and then
immediately issue a query in which the updated document must be in the
resulting hits), so keeping a "background working copy" of the index and
switching it out with a live copy doesn't work in this case.

I started looking at the performance issues involved in updating one
document at a time, and found that most of the cost is in opening and
closing readers&writers.

So one thing I've been wondering:  Why do you need to do deletes from an
indexreader?  Is there some reason why a writer couldn't be modified to do
both deletes and adds?

Could someone who is familiar with the design please explain why a reader is
required?   This seems to be a common enough issue that I bet a lot of
people on this list would benefit from a thorough explanation.   ( I just
ordered the LIA book, if it's explained in there, then my apologies for not
having read it before posting here)


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message