[ 
https://issues.apache.org/jira/browse/LUCENE-4580?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13508241#comment-13508241
 ] 

Uwe Schindler commented on LUCENE-4580:
---------------------------------------

bq. If a Filter is not cached, how efficient is using TermsFilter(oneTerm) vs. 
CSQ(TermQuery)? Are we talking huge gains here? If not, let's keep the API 
simple. DrillDown offers the terms() API too, so one can construct 
BooleanFilter, TermsFilter and whatever he wants out of them.

CSQ(TermQuery)) is way faster, as it can leap-frog. TermsFilter with one term 
will allocate a Bitset and then mark all positings in it; also those postings 
which are not needed (this depends on the FilteredQuery mode, which is used to 
apply filters). CSQ(TermQuery) will leap-frog so the original query and the 
single TermQuery will advance each other and lead to fastest execution, while 
the TermsFilter prepares a bitset before the query execution, so the latency 
will be bigger (2 steps).
                
> Facet DrillDown should return a Filter not Query
> ------------------------------------------------
>
>                 Key: LUCENE-4580
>                 URL: https://issues.apache.org/jira/browse/LUCENE-4580
>             Project: Lucene - Core
>          Issue Type: Improvement
>          Components: modules/facet
>            Reporter: Shai Erera
>            Priority: Minor
>
> DrillDown is a helper class which the user can use to convert a facet value 
> that a user selected into a Query for performing drill-down or narrowing the 
> results. The API has several static methods that create e.g. a Term or Query.
> Rather than creating a Query, it would make more sense to create a Filter I 
> think. In most cases, the clicked facets should not affect the scoring of 
> documents. Anyway, even if it turns out that it must return a Query (which I 
> doubt), we should at least modify the impl to return a ConstantScoreQuery.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to