Thanks Michael,
I would like to get the suggestion of terms and not just words, for example:
addDoc(w,"Lucene in Action");
addDoc(w,"Lucene for Dummies");
addDoc(w,"Managing Gigabytes");
addDoc(w,"The Art of Computer Science");
main.printSuggests("lucina in",my_reader);
public void printSuggests(String s, IndexReader ir) throws IOException{
DirectSpellChecker ds = new DirectSpellChecker();
Term tm = new Term("title", s);
SuggestWord[] suggestions = ds.suggestSimilar(tm,5,ir);
for (int i=0; i < suggestions.lenght; i++)
System.out.println(suggestions[i].string);
}
I would like that suggestion was "in lucene" but it does not. Someone can
tell me why? and how do I solve this problem?
--
View this message in context:
http://lucene.472066.n3.nabble.com/Suggestion-words-in-FuzzyQuery-tp4031354p4031558.html
Sent from the Lucene - Java Developer mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]