lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vanlerberghe, Luc" <>
Subject RE: GData, updateable IndexSearcher
Date Fri, 28 Apr 2006 06:08:21 GMT
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
- 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).


-----Original Message-----
From: Yonik Seeley [] 
Sent: donderdag 27 april 2006 20:30
Subject: Re: GData, updateable IndexSearcher

On 4/27/06, Robert Engels <> wrote:
> I thought each segment maintained its own list of deleted documents


> (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 Solr, the open-source Lucene search

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

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

View raw message