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.

        Activity

        Hide
        jira-bot ASF subversion and git services added a comment -

        Commit 1598196 from Michael McCandless in branch 'dev/branches/branch_4x'
        [ https://svn.apache.org/r1598196 ]

        SOLR-6029: fix smoke test failure

        Show
        jira-bot ASF subversion and git services added a comment - Commit 1598196 from Michael McCandless in branch 'dev/branches/branch_4x' [ https://svn.apache.org/r1598196 ] SOLR-6029 : fix smoke test failure
        Hide
        jira-bot ASF subversion and git services added a comment -

        Commit 1598195 from Michael McCandless in branch 'dev/trunk'
        [ https://svn.apache.org/r1598195 ]

        SOLR-6029: fix smoke test failure

        Show
        jira-bot ASF subversion and git services added a comment - Commit 1598195 from Michael McCandless in branch 'dev/trunk' [ https://svn.apache.org/r1598195 ] SOLR-6029 : fix smoke test failure
        Hide
        jira-bot ASF subversion and git services added a comment -

        Commit 1592880 from Joel Bernstein in branch 'dev/branches/lucene_solr_4_8'
        [ https://svn.apache.org/r1592880 ]

        SOLR-6029: CollapsingQParserPlugin throws ArrayIndexOutOfBoundsException if elevated doc has been deleted from a segment

        Show
        jira-bot ASF subversion and git services added a comment - Commit 1592880 from Joel Bernstein in branch 'dev/branches/lucene_solr_4_8' [ https://svn.apache.org/r1592880 ] SOLR-6029 : CollapsingQParserPlugin throws ArrayIndexOutOfBoundsException if elevated doc has been deleted from a segment
        Hide
        jira-bot ASF subversion and git services added a comment -

        Commit 1592821 from hossman@apache.org in branch 'dev/branches/lucene_solr_4_8'
        [ https://svn.apache.org/r1592821 ]

        Merge back several "low hanging" bug fixes into the 4.8 branch...
        SOLR-6029: r1590867
        SOLR-6030: r1591555
        SOLR-6037: r1591800
        SOLR-6023: r1592195
        SOLR-5090: r1592591
        SOLR-6039: r1592605
        SOLR-5993: r1588415
        SOLR-5904: r1587702

        Show
        jira-bot ASF subversion and git services added a comment - Commit 1592821 from hossman@apache.org in branch 'dev/branches/lucene_solr_4_8' [ https://svn.apache.org/r1592821 ] Merge back several "low hanging" bug fixes into the 4.8 branch... SOLR-6029 : r1590867 SOLR-6030 : r1591555 SOLR-6037 : r1591800 SOLR-6023 : r1592195 SOLR-5090 : r1592591 SOLR-6039 : r1592605 SOLR-5993 : r1588415 SOLR-5904 : r1587702
        Hide
        jira-bot ASF subversion and git services added a comment -

        Commit 1590966 from Joel Bernstein in branch 'dev/branches/branch_4x'
        [ https://svn.apache.org/r1590966 ]

        SOLR-6029: Updated CHANGES.txt

        Show
        jira-bot ASF subversion and git services added a comment - Commit 1590966 from Joel Bernstein in branch 'dev/branches/branch_4x' [ https://svn.apache.org/r1590966 ] SOLR-6029 : Updated CHANGES.txt
        Hide
        jira-bot ASF subversion and git services added a comment -

        Commit 1590965 from Joel Bernstein in branch 'dev/trunk'
        [ https://svn.apache.org/r1590965 ]

        SOLR-6029: Updated CHANGES.txt

        Show
        jira-bot ASF subversion and git services added a comment - Commit 1590965 from Joel Bernstein in branch 'dev/trunk' [ https://svn.apache.org/r1590965 ] SOLR-6029 : Updated CHANGES.txt
        Hide
        jira-bot ASF subversion and git services added a comment -

        Commit 1590868 from Joel Bernstein in branch 'dev/branches/branch_4x'
        [ https://svn.apache.org/r1590868 ]

        SOLR-6029: Updated CHANGES.txt

        Show
        jira-bot ASF subversion and git services added a comment - Commit 1590868 from Joel Bernstein in branch 'dev/branches/branch_4x' [ https://svn.apache.org/r1590868 ] SOLR-6029 : Updated CHANGES.txt
        Hide
        jira-bot ASF subversion and git services added a comment -

        Commit 1590867 from Joel Bernstein in branch 'dev/trunk'
        [ https://svn.apache.org/r1590867 ]

        SOLR-6029: Updated CHANGES.txt

        Show
        jira-bot ASF subversion and git services added a comment - Commit 1590867 from Joel Bernstein in branch 'dev/trunk' [ https://svn.apache.org/r1590867 ] SOLR-6029 : Updated CHANGES.txt
        Hide
        jira-bot ASF subversion and git services added a comment -

        Commit 1590866 from Joel Bernstein in branch 'dev/branches/branch_4x'
        [ https://svn.apache.org/r1590866 ]

        SOLR-6029: CollapsingQParserPlugin throws ArrayIndexOutOfBoundsException if elevated doc has been deleted from a segment

        Show
        jira-bot ASF subversion and git services added a comment - Commit 1590866 from Joel Bernstein in branch 'dev/branches/branch_4x' [ https://svn.apache.org/r1590866 ] SOLR-6029 : CollapsingQParserPlugin throws ArrayIndexOutOfBoundsException if elevated doc has been deleted from a segment
        Hide
        jira-bot ASF subversion and git services added a comment -

        Commit 1590865 from Joel Bernstein in branch 'dev/trunk'
        [ https://svn.apache.org/r1590865 ]

        SOLR-6029: CollapsingQParserPlugin throws ArrayIndexOutOfBoundsException if elevated doc has been deleted from a segment

        Show
        jira-bot ASF subversion and git services added a comment - Commit 1590865 from Joel Bernstein in branch 'dev/trunk' [ https://svn.apache.org/r1590865 ] SOLR-6029 : CollapsingQParserPlugin throws ArrayIndexOutOfBoundsException if elevated doc has been deleted from a segment
        Hide
        joel.bernstein Joel Bernstein added a comment -

        Thanks Greg, this is a nasty bug.

        Show
        joel.bernstein Joel Bernstein added a comment - Thanks Greg, this is a nasty bug.
        Hide
        gregharris73 Greg Harris added a comment -

        Patch with test for 4.7

        Show
        gregharris73 Greg Harris added a comment - Patch with test for 4.7

          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:

              Development