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

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    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. PriorityQueue.java.diff
          0.9 kB
          Doron Cohen
        3. LUCENE-504.patch
          3 kB
          Uwe Schindler
        4. LUCENE-504.patch
          6 kB
          Uwe Schindler
        5. fuzzyquery.patch
          5 kB
          Nadav Har'El
        6. BooleanQuery.java.diff
          0.8 kB
          Doron Cohen

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

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

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment