Uploaded image for project: 'Solr'
  1. Solr
  2. SOLR-6722

Distributed function query sumtotaltermfreq does not return correct aggregated result

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Won't Fix
    • None
    • None
    • None

    Description

      The relevancy function query sumtotaltermfreq uses maxScore to return its result. However, in distributed mode, "max" is the incorrect aggregation function for sumtotaltermfreq. Instead, the "sum" should be returned.

      For example, in the following break-down of 3 shards, we expect the sumtotaltermfreq to be 1802.0 + 1693.0 + 1693.0, but instead the overall query returns a maxScore of 1802.0, which is the max but not the answer we want, and the sum is not returned anywhere.

      {
      "responseHeader":{
      "status":0,
      "QTime":4,
      "params":{
      "debugQuery":"true)",
      "indent":"true",
      "q":"sumtotaltermfreq(field1)",
      "wt":"json",
      "rows":"0",
      "defType":"func"}},
      "response":

      {"numFound”:477,”start":0,"maxScore":1802.0,"docs":[] }

      ,
      "debug":{
      "track":{
      "rid":"-collection1_shard1_replica1-1415238629909-9",
      "EXECUTE_QUERY":[
      "http://<host1 ip>:8983/solr/collection1_shard2_replica1/|http://<host2 ip>:8984/solr/collection1_shard2_replica2/",[
      "QTime","1",
      "ElapsedTime","2",
      "RequestPurpose","GET_TOP_IDS",
      "NumFound","165",
      "Response","{responseHeader={status=0,QTime=1,params={distrib=false,debug=track,wt=javabin,requestPurpose=GET_TOP_IDS,version=2,rows=0,defType=func,NOW=1415238629908,shard.url=http://<host1 ip>:8983/solr/collection1_shard2_replica1/|http://<host2 ip>:8984/solr/collection1_shard2_replica2/,df=text,debugQuery=false,fl=uuid,score,rid=-collection1_shard1_replica1-1415238629909-9,start=0,q=sumtotaltermfreq(field1),isShard=true,fsv=true}},response=

      {numFound=165,start=0,maxScore=1802.0,docs=[]}

      ,sort_values={},debug={}}"],
      "http://<host2 ip>:8985/solr/collection1_shard1_replica1/|http://<host1 ip>:8986/solr/collection1_shard1_replica2/",[
      "QTime","0",
      "ElapsedTime","2",
      "RequestPurpose","GET_TOP_IDS",
      "NumFound","145",
      "Response","{responseHeader={status=0,QTime=0,params={distrib=false,debug=track,wt=javabin,requestPurpose=GET_TOP_IDS,version=2,rows=0,defType=func,NOW=1415238629908,shard.url=http://<host2 ip>:8985/solr/collection1_shard1_replica1/|http://<host1 ip>:8986/solr/collection1_shard1_replica2/,df=text,debugQuery=false,fl=uuid,score,rid=-collection1_shard1_replica1-1415238629909-9,start=0,q=sumtotaltermfreq(field1),isShard=true,fsv=true}},response=

      {numFound=145,start=0,maxScore=1693.0,docs=[]}

      ,sort_values={},debug={}}"],
      "http://<host2 ip>:8988/solr/collection1_shard3_replica1/|http://<host1 ip>:8987/solr/collection1_shard3_replica2/",[
      "QTime","0",
      "ElapsedTime","2",
      "RequestPurpose","GET_TOP_IDS",
      "NumFound","167",
      "Response","{responseHeader={status=0,QTime=0,params={distrib=false,debug=track,wt=javabin,requestPurpose=GET_TOP_IDS,version=2,rows=0,defType=func,NOW=1415238629908,shard.url=http://<host2 ip>:8988/solr/collection1_shard3_replica1/|http://<host1 ip>:8987/solr/collection1_shard3_replica2/,df=text,debugQuery=false,fl=uuid,score,rid=-collection1_shard1_replica1-1415238629909-9,start=0,q=sumtotaltermfreq(field1),isShard=true,fsv=true}},response=

      {numFound=167,start=0,maxScore=1693.0,docs=[]}

      ,sort_values={},debug={}}"]]},
      "explain":{}}}

      Attachments

        Activity

          People

            Unassigned Unassigned
            mewmewball Jessica Cheng Mallet
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: