lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael McCandless <>
Subject Re: Flex & Docs/AndPositionsEnum
Date Wed, 10 Feb 2010 17:20:18 GMT
On Wed, Feb 10, 2010 at 9:47 AM, Renaud Delbru <> wrote:
> On 10/02/10 13:15, Uwe Schindler wrote:
>>> Could you provide pointers to search code that uses the segment-level
>>> enum ?
>>> As I explained in my last answer to Michael, the TermScorer is using
>>> the
>>> DocsEnum interface, and therefore do not know if it manipulates
>>> segment-level enum or a Multi*Enums. What search (or query operators)
>>> in
>>> Lucene is using segment-level enums ?
>> All of them, only rewrites are currently done on the top-level reader.
>> IndexSearcher since 2.9 creates Scorers in separate for each segment and
>> merges the results in its collector. Because of that we have a modified
>> Collector interface that has setNextReader() methods and so on.
> Ok, so for example, in TermQuery$TermWeight#scorer(reader, scoreDocsInOrder,
> topScorer), the reader passed as parameter is one of the subscorer ? Is that
> right ?

Right, it will be a SegmentReader.

But, you're right -- the scorer method will also accept a
Multi/DirectoryReader, and iterate a Multi*Enum in that case.  It's
just less performant, so, Lucene doesn't do that when it creates


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

View raw message