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

SlowFuzzyQuery appears to fail with edit distance >=3 in some cases

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 4.3
    • 4.4, 6.0
    • modules/other
    • None
    • New

    Description

      Levenshtein edit btwn "monday" and "montugu" should be 4. The following shows a query with "sim" set to 3, and there is a hit.

      public void testFuzzinessLong2() throws Exception

      { Directory directory = newDirectory(); RandomIndexWriter writer = new RandomIndexWriter(random(), directory); addDoc("monday", writer); IndexReader reader = writer.getReader(); IndexSearcher searcher = newSearcher(reader); writer.close(); SlowFuzzyQuery query; query = new SlowFuzzyQuery(new Term("field", "montugu"), 3, 0); ScoreDoc[] hits = searcher.search(query, null, 1000).scoreDocs; assertEquals(0, hits.length); }

      Attachments

        Activity

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

          People

            Unassigned Unassigned
            tallison Tim Allison
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment