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

FuzzyQuery produces a "java.lang.NegativeArraySizeException" in PriorityQueue.initialize if I use Integer.MAX_VALUE as BooleanQuery.MaxClauseCount

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.9
    • Fix Version/s: 3.0
    • Component/s: core/search
    • Labels:
      None
    • Lucene Fields:
      Patch Available

      Description

      PriorityQueue creates an "java.lang.NegativeArraySizeException" when initialized with Integer.MAX_VALUE, because Integer overflows. I think this could be a general problem with PriorityQueue. The Error occured when I set BooleanQuery.MaxClauseCount to Integer.MAX_VALUE and user a FuzzyQuery for searching.

        Attachments

        1. TestFuzzyQueryError.java
          2 kB
          Joerg Henss
        2. BooleanQuery.java.diff
          0.8 kB
          Doron Cohen
        3. PriorityQueue.java.diff
          0.9 kB
          Doron Cohen
        4. fuzzyquery.patch
          5 kB
          Nadav Har'El
        5. LUCENE-504.patch
          3 kB
          Uwe Schindler
        6. LUCENE-504.patch
          6 kB
          Uwe Schindler

          Activity

            People

            • Assignee:
              thetaphi Uwe Schindler
              Reporter:
              henss Joerg Henss
            • Votes:
              4 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: