You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Markus Jelsma (JIRA)" <ji...@apache.org> on 2011/08/02 17:31:27 UTC

[jira] [Created] (SOLR-2689) !frange with query($qq) sets score=1.0f for all returned documents

!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-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


[jira] [Commented] (SOLR-2689) !frange with query($qq) sets score=1.0f for all returned documents

Posted by "Markus Jelsma (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SOLR-2689?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13078467#comment-13078467 ] 

Markus Jelsma commented on SOLR-2689:
-------------------------------------

You are right, it's because both examples use one search term and thus all have the same score. It shows when not all scores are identical when you use multiple terms. I'll provide a better description and example next week when i'll get back.

> !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-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


[jira] [Commented] (SOLR-2689) !frange with query($qq) sets score=1.0f for all returned documents

Posted by "Otis Gospodnetic (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SOLR-2689?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13078451#comment-13078451 ] 

Otis Gospodnetic commented on SOLR-2689:
----------------------------------------

Markus - I can't even tell this frange call cuts-off any of the hits - you have numFound="227763" in both examples above.  Am I missing something? :)

> !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-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


[jira] [Commented] (SOLR-2689) !frange with query($qq) sets score=1.0f for all returned documents

Posted by "Hoss Man (JIRA)" <ji...@apache.org>.
    [ 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-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


[jira] [Resolved] (SOLR-2689) !frange with query($qq) sets score=1.0f for all returned documents

Posted by "Hoss Man (Resolved) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SOLR-2689?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Hoss Man resolved SOLR-2689.
----------------------------

       Resolution: Not A Problem
    Fix Version/s:     (was: 3.5)
                       (was: 4.0)

resolving as a non-issue ... things are working as advertised, and there is an alternate query structure that will produce the same scoring + filtering that seems to be desired.
                
> !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
>
> 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.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


[jira] [Commented] (SOLR-2689) !frange with query($qq) sets score=1.0f for all returned documents

Posted by "Mariusz Droździel (Commented JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SOLR-2689?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13205359#comment-13205359 ] 

Mariusz Droździel commented on SOLR-2689:
-----------------------------------------

I tried this alternative notation but it doesn't produce any expected results for me either. I can specify arbitrary "u" and I will still get the same results. If I specify "l" (regardless which value) I will get zero results. Am I running into another issue I am not aware of? If I use the notation with query($) I am getting scores at 1.0f, just like the original poster...

                
> !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
>
> 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.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


[jira] [Commented] (SOLR-2689) !frange with query($qq) sets score=1.0f for all returned documents

Posted by "Hoss Man (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SOLR-2689?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13078522#comment-13078522 ] 

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

I don't really understand why this is a bug?

"frange" is the FunctionRangeQParserPlugin which produces ConstantScoreRangeQueries -- it doesn't matter when/how/why it's used (or that the function it's wrapping comes from an arbitrary query), it always produces range queries that generate constant scores.

> !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-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org