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 15:47:12 GMT
> You keep stating that you never need to close the IndexWriter. I
> don't believe this is the case, and you are possibly misleading
> people as to the extent of your patch.
> Don't you need to close (or flush) to get the documents on disk, so
> a  new IndexReader can find them? If not any documents added using
> your IndexWriter are not visible. If I open another IndexReader while
> the IndexWriter is open, I don't not have any deterministic way of
> knowing what should be available.

As I described in the design overview, a flush would be triggered in
the following senarios:
 - maybeMergeSegments()
   Before, a flush would be triggered only if enough documents were
   buffered. Now a flush is triggered if enough documents are
   buffered OR if enough delete terms are buffered.

If there aren't enough documents or delete terms buffered, but you
want them on disk, then you need to flush. If you always have enough
buffered, IndexWriter flushes for you. This behaviour is similar as it
is today. It is really not my intention to mislead anyone...


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

View raw message