lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christoph Goller <gol...@detego-software.de>
Subject Re: File timestamps / subclassing of IndexReader
Date Wed, 19 Nov 2003 15:51:41 GMT
Sorry for the delay. I was busy with other things and it took some
time to fix the problems that Doug mentioned.

Furthermore, thanks for the links concerning dublicate checking.

I would like to commit my timestamp patch in the next few days.
So my question goes to  the mailing list whether there are any
objections.

Doug Cutting schrieb:
> I like this approach, but I have two concerns:
> 
> 1. For back-compatibility, the version number should be written at the 
> end of the "segments" file, not at its start.  This may make things a 
> big slower, but we should not incompatibly change the file format: 
> existing indexes should still open correctly.

done.
I also made some tests. Reading and old index and changing it works now.

> 
> 2. There should be public IndexReader.getVersion methods, correspodning 
> to the existing IndexReader.getLastModified methods.  The lastModified 
> methods should be deprecated, with a comment indicating that the 
> getVersion methods should be used instead.
> 

done

please have a look at the latest version of this patch in this mail
(again to be applied to index directory).

Some thoughts about FilterIndexReader:
I noticed that all synchronization for a FilterIndexReader is done
by the FilterIndexReader itself, more precisely by its superclass
IndexReader and its methods delete and close. The synchronization
is not done by FilterIndexReader's member in. Since I introduced
a SegmentInfos member in IndexReader for synchronization purposes
it is needed there also for the superclass of a FilterIndexReader.
I changed the constructor of FilterIndexReader to achieve that.


Christoph



Mime
View raw message