Hello, Well, I need do a query to locate Phrases like that: Petruz Augusto Petruz Auguzto Petrs Augusto ...
Well, in a single word, I can use fuzzy, but, how I can use it in phrases? I think that I need use PhraseQuery, but, I never get any result.. (code below). Thanks [code] IndexReader reader = DirectoryReader.open(dir); IndexSearcher searcher = new IndexSearcher(reader); Term term1 = new Term("contents", string1); Term term2 = new Term("contents", string2); PhraseQuery phraseQuery = new PhraseQuery(); phraseQuery.add(term1); phraseQuery.add(term2); phraseQuery.setSlop(50); final TopDocs results = searcher.search(phraseQuery, Integer.MAX_VALUE); System.out.println(results.totalHits); [/code] -- View this message in context: http://lucene.472066.n3.nabble.com/How-to-use-PhraseQuery-with-Fuzzy-tp4160519.html Sent from the Lucene - Java Users mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org For additional commands, e-mail: java-user-h...@lucene.apache.org