lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Doug Cutting <>
Subject Re: GData, updateable IndexSearcher
Date Fri, 28 Apr 2006 16:11:39 GMT
Vanlerberghe, Luc wrote:
> 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).

Correct.  However if Filters were cached based on the IndexReader (as is 
standard) then these filters would now be invalid.  So it would be 
safest to clone the IndexReader, reusing all datastructures except the 
deletions which would be re-read.  This would force the filters to be 
re-cached based on the new deletions.

Another complication is determining whether deletions have changed.  We 
don't have a per-segment version number.  We could either add a version 
to the segment (perhaps even in the deletions file) or store the date of 
the deletions file when it is read and compare that.  There are problems 
using file modification times (poor resolution on some OSes, etc.) but 
that is the simplest approach.


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

View raw message