[
https://issues.apache.org/jira/browse/LUCENE-4282?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13427204#comment-13427204
]
Uwe Schindler commented on LUCENE-4282:
---------------------------------------
There is indeed something strange, I have to wait for Robert to get awake. The
following test failes (when added to TestFuzzyQuery.java):
{code:java}
public void test2() throws Exception {
Directory directory = newDirectory();
RandomIndexWriter writer = new RandomIndexWriter(random(), directory, new
MockAnalyzer(random(), MockTokenizer.KEYWORD, false));
addDoc("LANGE", writer);
addDoc("LUETH", writer);
addDoc("PIRSING", writer);
addDoc("RIEGEL", writer);
addDoc("TRZECZIAK", writer);
addDoc("WALKER", writer);
addDoc("WBR", writer);
addDoc("WE", writer);
addDoc("WEB", writer);
addDoc("WEBE", writer);
addDoc("WEBER", writer);
addDoc("WITTKOPF", writer);
addDoc("WOJNAROWSKI", writer);
addDoc("WRICKE", writer);
IndexReader reader = writer.getReader();
IndexSearcher searcher = newSearcher(reader);
writer.close();
FuzzyQuery query = new FuzzyQuery(new Term("field", "WEBER"), 2, 1);
ScoreDoc[] hits = searcher.search(query, null, 1000).scoreDocs;
assertEquals(4, hits.length);
reader.close();
directory.close();
}
{code}
The two missing terms have 2 deletions, so they are in edit distance.
> Automaton Fuzzy Query doesn't deliver all results
> -------------------------------------------------
>
> Key: LUCENE-4282
> URL: https://issues.apache.org/jira/browse/LUCENE-4282
> Project: Lucene - Core
> Issue Type: Bug
> Components: core/search
> Affects Versions: 4.0-ALPHA
> Reporter: Johannes Christen
> Labels: newbie
>
> Having a small index with n documents where each document has one of the
> following terms:
> WEBER, WEBE, WEB, WBR, WE, (and some more)
> The new FuzzyQuery (Automaton) with maxEdits=2 only delivers the expected
> terms WEBER and WEBE in the rewritten query. The expected terms WEB and WBR
> which have an edit distance of 2 as well are missing.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]