Lucene - Core
  1. Lucene - Core
  2. LUCENE-5653

JoinUtil - ArrayIndexOutOfBoundsException: 256

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 4.8.1
    • Fix Version/s: 4.8.1, 4.9, 6.0
    • Component/s: modules/join
    • Labels:
    • Lucene Fields:
      New, Patch Available

      Description

      TermsWithScoreCollector.MV.Avg refuse to resize array.
      It occurs if JoinUtil.createJoinQuery() is called for multivalue join and avg scorring and the nested query found greater than TermsWithScoreCollector.INITIAL_ARRAY_SIZE (256) terms. As a result we have:

      ava.lang.ArrayIndexOutOfBoundsException: 256\r\n\tat org.apache.lucene.search.join.TermsWithScoreCollector$MV$Avg.collect(TermsWithScoreCollector.java:246)\r\n\tat org.apache.lucene.search.Scorer.score(Scorer.java:65)\r\n\tat org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:621)\r\n\tat org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:309)\r\n\tat org.apache.lucene.search.join.JoinUtil.createJoinQuery(JoinUtil.java:80)\r\n\tat org.apache.solr.search.join.ScoreJoinQParserPlugin$SameCoreJoinQuery.rewrite(ScoreJoinQParserPlugin.java:159)\r\n\tat org.apache.lucene.search.IndexSearcher.rewrite(IndexSearcher.java:636)\r\n\tat org.apache.lucene.search.IndexSearcher.createNormalizedWeight(IndexSearcher.java:683)\r\n\tat org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:297)\r\n\tat

      1. LUCENE-5653.patch
        3 kB
        Mikhail Khludnev

        Activity

        Hide
        Mikhail Khludnev added a comment -

        fix is obvious, test is a little bit weird, feel free to come up with an alternative

        Show
        Mikhail Khludnev added a comment - fix is obvious, test is a little bit weird, feel free to come up with an alternative
        Hide
        Robert Muir added a comment -

        Thanks Mikhail. I'll review this shortly and try to get it into 4.8.1

        Show
        Robert Muir added a comment - Thanks Mikhail. I'll review this shortly and try to get it into 4.8.1
        Hide
        ASF subversion and git services added a comment -

        Commit 1593159 from Robert Muir in branch 'dev/trunk'
        [ https://svn.apache.org/r1593159 ]

        LUCENE-5653: add missing array resize to multi-valued averaging TermsWithScoreCollector

        Show
        ASF subversion and git services added a comment - Commit 1593159 from Robert Muir in branch 'dev/trunk' [ https://svn.apache.org/r1593159 ] LUCENE-5653 : add missing array resize to multi-valued averaging TermsWithScoreCollector
        Hide
        ASF subversion and git services added a comment -

        Commit 1593160 from Robert Muir in branch 'dev/branches/branch_4x'
        [ https://svn.apache.org/r1593160 ]

        LUCENE-5653: add missing array resize to multi-valued averaging TermsWithScoreCollector

        Show
        ASF subversion and git services added a comment - Commit 1593160 from Robert Muir in branch 'dev/branches/branch_4x' [ https://svn.apache.org/r1593160 ] LUCENE-5653 : add missing array resize to multi-valued averaging TermsWithScoreCollector
        Hide
        ASF subversion and git services added a comment -

        Commit 1593161 from Robert Muir in branch 'dev/branches/lucene_solr_4_8'
        [ https://svn.apache.org/r1593161 ]

        LUCENE-5653: add missing array resize to multi-valued averaging TermsWithScoreCollector

        Show
        ASF subversion and git services added a comment - Commit 1593161 from Robert Muir in branch 'dev/branches/lucene_solr_4_8' [ https://svn.apache.org/r1593161 ] LUCENE-5653 : add missing array resize to multi-valued averaging TermsWithScoreCollector
        Hide
        Robert Muir added a comment -

        Thanks Mikhail!

        Show
        Robert Muir added a comment - Thanks Mikhail!

          People

          • Assignee:
            Unassigned
            Reporter:
            Mikhail Khludnev
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development