lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From abhayd <ajdabhol...@hotmail.com>
Subject sorting using function query results are notin order
Date Mon, 03 Oct 2011 19:42:32 GMT
hi 
I am trying to sort results from solr using sum(count,score) function.
Basically its not adding things correctly.  
For example here is partial sample response
        "Count":54,
        "UserQuery":"how to",
        "score":1.2550932,
        "query({!dismax qf=UserQuery v='how'})":1.2550932,
        "sum(Count,query({!dismax qf=UserQuery v='how'}))":1.2550932},

how come addition of 54+1.2550932 is equla to 1.2550932 ?as if

What i m doing wrong?
here is my complete query
------------------------------------
http://localhost:10101/solr/autosuggest/select?q=how&start=0&indent=on&wt=json&rows=5&sort=sum%28Count,query%28{!dismax%20qf=UserQuery%20v=%27how%27}%29%29%20desc&fl=UserQuery,score,Count,query%28{!dismax%20qf=UserQuery%20v=%27how%27}%29,sum%28Count,query%28{!dismax%20qf=UserQuery%20v=%27how%27}%29%29&debug=true

{
  "responseHeader":{
    "status":0,
    "QTime":0,
    "params":{
      "sort":"sum(Count,query({!dismax qf=UserQuery v='how'})) desc",
      "wt":"json",
      "rows":"5",
      "indent":"on",
      "fl":"UserQuery,score,Count,query({!dismax qf=UserQuery
v='how'}),sum(Count,query({!dismax qf=UserQuery v='how'}))",
      "debug":"true",
      "start":"0",
      "q":"how"}},
  "response":{"numFound":2628,"start":0,"maxScore":1.2550932,"docs":[
      {
        "Count":54,
        "UserQuery":"how to",
        "score":1.2550932,
        "query({!dismax qf=UserQuery v='how'})":1.2550932,
        "sum(Count,query({!dismax qf=UserQuery v='how'}))":1.2550932},
      {
        "Count":51,
        "UserQuery":"how to text",
        "score":0.8964951,
        "query({!dismax qf=UserQuery v='how'})":0.8964951,
        "sum(Count,query({!dismax qf=UserQuery v='how'}))":0.8964951},
      {
        "Count":117,
        "UserQuery":"how to block calls",
        "score":0.7171961,
        "query({!dismax qf=UserQuery v='how'})":0.7171961,
        "sum(Count,query({!dismax qf=UserQuery v='how'}))":0.7171961},
      {
        "Count":109,
        "UserQuery":"how to call forward",
        "score":0.7171961,
        "query({!dismax qf=UserQuery v='how'})":0.7171961,
        "sum(Count,query({!dismax qf=UserQuery v='how'}))":0.7171961},
      {
        "Count":79,
        "UserQuery":"how do I pay my bill?",
        "score":0.7171961,
        "query({!dismax qf=UserQuery v='how'})":0.7171961,
        "sum(Count,query({!dismax qf=UserQuery v='how'}))":0.7171961}]
  },


--
View this message in context: http://lucene.472066.n3.nabble.com/sorting-using-function-query-results-are-notin-order-tp3390926p3390926.html
Sent from the Solr - User mailing list archive at Nabble.com.

Mime
View raw message