lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Doug Cutting <cutt...@apache.org>
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.

Doug


---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org


Mime
View raw message