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

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

Hi,

In general I would prefer another approach for the whole thing. We should not 
make the users decide if then need to use a Filter or Query or whatever drill 
down approach. The user API should only use Query: Query in, Query out:

{code:java}
Query drilldown(Query originalQuery, CategoryPath... categories)
{code}

This would get the user query to drill down as input and return a new Query 
with the same scoring, but somehow filtered. Internally this method can use a 
Filter or Query or whatever to do the drill down, the user does not need to 
think about. It should just add 2 options: conjunction or disjunction.

The following possibilities are available:
- one or more category path, conjunction: returns new BooleanQuery(true) [no 
coord], consisting of the original Query as clause and multiple 
CSQ(TermQuery(category)) with boost=0.0 (boost=0 means the BQ does not get any 
value from the filter clause and with disableCoord=true nothing changes)
- more than one category path, disjunction between categories: return 
FilteredQuery(originalQuery, new TermsFilter(terms))
                
> 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