lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christoph Goller <>
Subject MultiReader
Date Thu, 01 Apr 2004 17:21:36 GMT
Hi folks,

you did a great job during the last 4 months. Due to other obligations
I was not able to keep track of all these contributions and new features
such as:

TermDocs.skipTo & Scorer.skipTo
result sorting

Fortunately, I have now been able to catch up. I tried to understand
all changes and reviewed them. So in the next few days you will
get a couple of comments and patch proposals.

Here is the first one concerning MultiReader.

As far as I understand, MultiReader is a kind of hybrid, trying to achieve
two different and partly conflicting goals:

1) It replaces SegmentsReader, which was and IndexReader accessing several
SegmentReader in one directory and doing the synchronization (for delete)
for them using the write lock for the directory and the SegmentInfos with
the version number to check staleness.

2) However, it also combines several IndexReaders that not necessarily
access Segments of the same directory. In this case synchronization (for
delete) probably should be done by the IndexReaders themselves.

Unfortunately, the current implementation of MultiReader does not distinguish
these two roles. For example TestIndexReader.testDeleteReaderReaderConflict(),
which is about the staleness of IndexReaders, fails if a MultiReader is used
(commenting out writer.optimize() in the testcase). The reason is, that
MultiReader in difference to SegmentsReader does not check staleness on
the SegmentInfos of its directory.


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

View raw message