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

Fuzzy query has a false negative when prefix length == search term length

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 9.0
    • core/query/scoring
    • None
    • New

    Description

      When using FuzzyQuery the search string `bba` does not match doc value `bbab` with an edit distance of 1 and prefix length of 3.

      In FuzzyQuery an automaton is created for the "suffix" part of the search string which in this case is an empty string.

      In this scenario maybe the FuzzyQuery should rewrite to a WildcardQuery of the following form :

          searchString + "?" 
      

      .. where there's an appropriate number of ? characters according to the edit distance.

      Attachments

        Issue Links

          Activity

            People

              mdrob Mike Drob
              mharwood Mark Harwood
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 20m
                  20m