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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]