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

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

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

        1. LUCENE-5033.patch
          9 kB
          Tim Allison
        2. LUCENE-5033.patch
          12 kB
          Tim Allison

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: