Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
4.3
-
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); }