On Wed, Feb 10, 2010 at 9:47 AM, Renaud Delbru <renaud.del...@deri.org> 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
scorers.

Mike

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org
For additional commands, e-mail: java-user-h...@lucene.apache.org

Reply via email to