Uploaded image for project: 'Lucene - Core'
  1. Lucene - Core
  2. LUCENE-9302

Integer overflow in total count in grouping results

Details

    • Improvement
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • None
    • None
    • None
    • None
    • New, Patch Available

    Description

      When doing a Grouping search in solr cloud you can get a negative number for the total found.

      This is caused by the accumulated total being held in an integer and not a long.

       

      example result:

      {{{ "responseHeader": { "status": 0, "QTime": 9231, "params":

      { "q": "decade:200", "indent": "true", "fl": "decade", "wt": "json", "group.field": "decade", "group": "true", "_": "1542773674247" }

      }, "grouped": { "decade": { "matches": -629516788, "groups": [ { "groupValue": "200", "doclist": { "numFound": -629516788, "start": 0, "maxScore": 1.9315376, "docs": [

      { "decade": "200" }

      ] } } ] } } }}}

       

      result without grouping:
      {{{ "responseHeader": { "status": 0, "QTime": 1063, "params":

      { "q": "decade:200", "indent": "true", "fl": "decade", "wt": "json", "_": "1542773791855" }

      }, "response": { "numFound": 3665450508, "start": 0, "maxScore": 1.9315376, "docs": [

      { "decade": "200" }

      ,

      { "decade": "200" }

      ,

      { "decade": "200" }

      ,

      { "decade": "200" }

      ,

      { "decade": "200" }

      ,

      { "decade": "200" }

      ,

      { "decade": "200" }

      ,

      { "decade": "200" }

      ,

      { "decade": "200" }

      ,

      { "decade": "200" }

      ] } }}}
       

      Attachments

        1. SOLR-13004.patch
          11 kB
          Ishan Chattopadhyaya
        2. SOLR-13004.patch
          11 kB
          Ishan Chattopadhyaya

        Issue Links

          Activity

            People

              ichattopadhyaya Ishan Chattopadhyaya
              IanNLA Ian
              Votes:
              1 Vote for this issue
              Watchers:
              9 Start watching this issue

              Dates

                Created:
                Updated:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 10m
                  10m