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

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

bq. Or better, move TermsFilter and BooleanFilter to core – why are they 
treated differently than TermQuery and BooleanQuery? Especially now that Filter 
is applied more efficiently, I suspect more people will want to use it?

TermsFilter - yes. See my comment above. We already have a very good 
Automaton-based one in test-framework that also needs to be moved to core (as a 
MTQ rewrite method).

BUT, about BooleanFilter: This class is horrible ineffective, inconsistent, and 
not good for drill downs (you should use it only when you want to do caching of 
filters with bitsets). If you use it for those type of queries you pay the 
price of allocating bitsets, iterate the wrapped queries/filters completely 
instead of advanceing the underlying scorers (leap-frogging). So for drilldowns 
BooleanFilter is the worst you can do!

The way to go from my opinion is to use constant score queries (like Solr does).

In addition we recently reopened / discussed again the very old issue to nuke 
Filters at all and just provide queries and nothing more. Filters are nothing 
more than constant score queries
                
> 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: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org

Reply via email to