Lucene - Core
  1. Lucene - Core
  2. LUCENE-5869

FuzzyQuery should require positive maxExpansions

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.10, 6.0
    • Component/s: None
    • Labels:
      None
    • Lucene Fields:
      New

      Description

      FuzzyQuery currently only disallows negative values of maxExpansions. However, passing 0 causes an NPE when the underlying TopTermsRewrite does a peek() on an empty queue, which returns null, and then goes on using it unknowingly.

        Activity

        Hide
        Ryan Ernst added a comment -

        Simple patch with test.

        Show
        Ryan Ernst added a comment - Simple patch with test.
        Hide
        Michael McCandless added a comment -

        +1

        Show
        Michael McCandless added a comment - +1
        Hide
        Adrien Grand added a comment -

        +1

        Show
        Adrien Grand added a comment - +1
        Hide
        ASF subversion and git services added a comment -

        Commit 1615945 from Ryan Ernst in branch 'dev/trunk'
        [ https://svn.apache.org/r1615945 ]

        LUCENE-5869: Added restriction to positive values for maxExpansions in FuzzyQuery

        Show
        ASF subversion and git services added a comment - Commit 1615945 from Ryan Ernst in branch 'dev/trunk' [ https://svn.apache.org/r1615945 ] LUCENE-5869 : Added restriction to positive values for maxExpansions in FuzzyQuery
        Hide
        ASF subversion and git services added a comment -

        Commit 1615954 from Ryan Ernst in branch 'dev/branches/branch_4x'
        [ https://svn.apache.org/r1615954 ]

        LUCENE-5869: Added restriction to positive values for maxExpansions in FuzzyQuery

        Show
        ASF subversion and git services added a comment - Commit 1615954 from Ryan Ernst in branch 'dev/branches/branch_4x' [ https://svn.apache.org/r1615954 ] LUCENE-5869 : Added restriction to positive values for maxExpansions in FuzzyQuery

          People

          • Assignee:
            Unassigned
            Reporter:
            Ryan Ernst
          • Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development