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

CollapsingQParserPlugin throws ArrayIndexOutOfBoundsException if elevated doc has been deleted from a segment

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 4.7.1
    • Fix Version/s: 4.8.1, 4.9
    • Component/s: query parsers
    • Labels:
      None

      Description

      CollapsingQParserPlugin misidentifies if a document is not found in a segment if the docid previously existed in a segment ie.... was deleted.

      Relevant code bit from CollapsingQParserPlugin needs to be changed from:
      -if(doc != -1) {
      +if((doc != -1) && (doc != DocsEnum.NO_MORE_DOCS)) {

      What happens is if the doc is not found the returned value is DocsEnum.NO_MORE_DOCS. This would then get set in the fq bitSet array as the doc location causing an ArrayIndexOutOfBoundsException as the array is only as big as maxDocs.

        Attachments

          Activity

            People

            • Assignee:
              joel.bernstein Joel Bernstein
              Reporter:
              gregharris73 Greg Harris
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: