Grant Ingersoll wrote:

On Aug 30, 2008, at 3:14 PM, Andrzej Bialecki wrote:


I think you can use a FilteredQuery in a BooleanClause. This may be faster than the filtering code in the Searcher, because the evaluation is done during scoring and not afterwards. FilteredQuery internally makes


FYI, not sure if this is exactly what you are talking about Andrzej, but IndexSearcher no longer filters after scoring. This was changed in https://issues.apache.org/jira/browse/LUCENE-584

Ah, indeed - I was working with 2.3.0 release ... then there should be no visible performance difference if using the trunk version of IndexSearcher.

The only difference now between the IndexSearcher method and ConjunctionScorer would be when the supplied filter would match many documents. IndexSearcher always runs skipTo on the filter first, so potentially it would stop at many docIds that aren't matching in the scorer - whereas the ConjunctionScorer tries to order sub-scorers so that "sparse" scorers are checked first.

--
Best regards,
Andrzej Bialecki     <><
 ___. ___ ___ ___ _ _   __________________________________
[__ || __|__/|__||\/|  Information Retrieval, Semantic Web
___|||__||  \|  ||  |  Embedded Unix, System Integration
http://www.sigram.com  Contact: info at sigram dot com


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to