lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ning Li" <>
Subject Re: [jira] Commented: (LUCENE-565) Supporting deleteDocuments in IndexWriter (Code and Performance Results Provided)
Date Mon, 10 Jul 2006 04:25:12 GMT
> To clarify, higher level (application level) adds and deletes can be
> managed at a lower level such that index readers and writers aren't
> continually opened and closed.
> The big question is, what kind of efficiencies do you get by putting
> this functionallity in IndexWriter vs a higher level class that uses
> IndexWriters and IndexReaders?  Unless there is a clear performance
> win, I'd prefer leaving IndexWriter simpler.

I think Lucene wants to excel not only in performance and
functionality, but also in operability. Almost all the Lucene newbies
that I know went through this learning curve of realizing you have to
batch inserts and deletes to achieve good performance. For some of
them, this cannot be easily done in the application level. This patch
improves operability for all of them, and it provides performance
improvement for the later group of people.

Conceptually, it's a clean modification. IndexWriter (or
IndexModifier) uses IndexReader to delete, just as IndexWriter already
uses IndexReader to merge. IndexWriter uses the same write lock it
acquired in its constructor to add AND delete documents, so ideally,
you never need to close IndexWriter! I really think it's worth it. :-)

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

View raw message