Here are some remarks from what I learned by inspecting the code (quite a while ago now, but the principle shouldn't have changed)...
When an IndexReader opens the segments of an index it - grabs the commit lock, - reads the "segments" file for the list of segment names. - opens the files for each segment (except the .del one), - *loads* the .del files associated with each segment (if present) and then - releases the commit lock. The segment files never change, and the .del files are loaded in memory so an open IndexReader will always have the same view of its segments, even if the .del files are changed by an other IndexReader. So if you want to implement reopen() of a segment, you should be fine by just reloading the .del file in memory for that segment (while holding the commit lock of course). Luc -----Original Message----- From: Yonik Seeley [mailto:[EMAIL PROTECTED] Sent: donderdag 27 april 2006 20:30 To: java-dev@lucene.apache.org; [EMAIL PROTECTED] Subject: Re: GData, updateable IndexSearcher On 4/27/06, Robert Engels <[EMAIL PROTECTED]> wrote: > I thought each segment maintained its own list of deleted documents Right. > (since segments are WRITE ONCE Yes, but deletions are the exception to that rule. Once written, segment files never change, except for the file that tracks deleted documents for that segment. Hence, if the segment name is the same, you should be able to count on everything being unchanged *except* for which documents are deleted. -Yonik http://incubator.apache.org/solr Solr, the open-source Lucene search server --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]