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

Hoss Man commented on SOLR-2689:
--------------------------------

Hmmm, ok ... it looks like maybe this bug was spured on by a recent mailing 
list thread about score filtering where someone referred to this even older 
thread with msg from Yonik...

http://search-lucene.com/m/4AHNF17wIJW1/

...based on his wording ("frange could possible help ... perhaps something 
like...", i don't think yonik really thought that answer through very hard, so 
it shouldn't be taken as gospel that he was advocating that solution would work 
(even though strictly speaking it does filter by score) let alone "will work 
and will still give you meaningful scores that you can sort on"

If you want to filter by arbitrary score (and i won't bother to list all the 
reasons i think that is a bad idea) and still get those score back and be able 
to sort on them, then you still need the "q" to be a query that produces 
scores, and leave the filtering to an "fq"...

{code}
?q=ipod&fl=*,score&fq={!frange+l=0.72}query($q)
{code}

> !frange with query($qq) sets score=1.0f for all returned documents
> ------------------------------------------------------------------
>
>                 Key: SOLR-2689
>                 URL: https://issues.apache.org/jira/browse/SOLR-2689
>             Project: Solr
>          Issue Type: Bug
>          Components: search
>    Affects Versions: 3.4
>            Reporter: Markus Jelsma
>             Fix For: 3.4, 4.0
>
>
> Consider the following queries, both query the default field for 'test' and 
> return the document digest and score (i don't seem to be able get only score, 
> fl=score returns all fields):
> This is a normal query and yields normal results with proper scores:
> {code}
> q=test&fl=digest,score
> {code}
> {code}
> <result name="response" numFound="227763" start="0" maxScore="4.952673">
> −
> <doc>
> <float name="score">4.952673</float>
> <str name="digest">c48e784f06a051d89f20b72194b0dcf0</str>
> </doc>
> −
> <doc>
> <float name="score">4.952673</float>
> <str name="digest">7f78a504b8cbd86c6cdbf2aa2c4ae5e3</str>
> </doc>
> −
> <doc>
> <float name="score">4.952673</float>
> <str name="digest">0f7fefa6586ceda42fc1f095d460aa17</str>
> </doc>
> {code}
> This query uses frange with query() to limit the number of returned 
> documents. When using multiple search terms i can indeed cut-off the result 
> set but in the end all returned documents have score=1.0f. The final result 
> set cannot be sorted by score anymore. The result set seems to be returned in 
> the order of Lucene docId's.
> {code}
> q={!frange l=1.23}query($qq)&qq=test&fl=digest,score
> {code}
> {code}
> <result name="response" numFound="227763" start="0" maxScore="1.0">
> −
> <doc>
> <float name="score">1.0</float>
> <str name="digest">c48e784f06a051d89f20b72194b0dcf0</str>
> </doc>
> −
> <doc>
> <float name="score">1.0</float>
> <str name="digest">7f78a504b8cbd86c6cdbf2aa2c4ae5e3</str>
> </doc>
> −
> <doc>
> <float name="score">1.0</float>
> <str name="digest">0f7fefa6586ceda42fc1f095d460aa17</str>
> </doc>
> {code}

--
This message is automatically generated by JIRA.
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