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

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 1.9
    • 3.0
    • core/search
    • None
    • 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

            uschindler Uwe Schindler
            henss Joerg Henss
            Votes:
            4 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: