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

Gilad Barkai edited comment on LUCENE-4580 at 12/4/12 5:47 AM:
---------------------------------------------------------------

Patch looks good.

Two comments:
* In {{SimpleSearcher}} the code is changed as such the {{DrillDown.query()}} 
always takes a {{new FacetSearchParams()}} (no default) - but that's not 
obvious it is the same one used for the search, or that it contains the 
{{FacetIndexingParams}} used for indexing. The defaults made sure that if none 
was specified along the way - the user should not bother himself with it. It is 
a small piece of code, but in an example might confuse the reader. I'm somewhat 
leaning toward allowing a default query() call without specifying a FSP.
* In the tests, perhaps use Float.MIN_VALUE or 0f when asserting equality of 
floats instead against 0.00000.

                
      was (Author: gilad):
    Patch looks good.

Two comments:
* In {{SimpleSearcher}} the code is change as such the {{DrillDown.query()}} 
always takes a {{new FacetSearchParams()}} (no default) - but that's not 
obvious it is the same one used for the search, or that it contains the 
{{FacetIndexingParams}} used for indexing. The defaults made sure that if none 
was specified along the way - the user should not bother himself with it. It is 
a small piece of code, but in an example might confuse the reader. I'm somewhat 
leaning toward allowing a default query() call without specifying a FSP.
* In the tests, perhaps use Float.MIN_VALUE or 0f when asserting equality of 
floats instead against 0.00000.

                  
> Facet DrillDown should return a ConstantScoreQuery
> --------------------------------------------------
>
>                 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
>         Attachments: LUCENE-4580.patch
>
>
> 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