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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to