java-user@lucene.apache.org
[Top] [All Lists]

Re: Flex & Docs/AndPositionsEnum

Subject: Re: Flex & Docs/AndPositionsEnum
From: Renaud Delbru
Date: Wed, 10 Feb 2010 14:47:45 +0000
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 ?

If this is the case, now I understand why Michael was saying that the way I am testing the postings (using termPositionsEnum on the top-level reader) was not really the proper way to test it, and that the correct way will be instead to use directly a TermQuery.

Thanks for the clarification.
--
Renaud Delbru

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@xxxxxxxxxxxxxxxxx
For additional commands, e-mail: java-user-help@xxxxxxxxxxxxxxxxx

<Prev in Thread] Current Thread [Next in Thread>