DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUGĀ· RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://issues.apache.org/bugzilla/show_bug.cgi?id=36296>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED ANDĀ· INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=36296 Summary: setPhraseSlop return the same results irrespective of int parameter Product: Lucene Version: 1.4 Platform: PC OS/Version: Windows 2000 Status: NEW Severity: normal Priority: P3 Component: QueryParser AssignedTo: java-dev@lucene.apache.org ReportedBy: [EMAIL PROTECTED] CC: [EMAIL PROTECTED] Please help me for my requirement to have a similiar word search functionality using Lucene. Read about slop in Lucene FAQ [Is there a way to use a proximity operator (like near or within) with Lucene?] and tried to implement the same. Calling setPhraseSlop on QueryParser class gives me the same results with different querytext values(querytext 1:"Anil Dhotre", querytext 2: "Dhotre Anil"). The result of search is always hit count equals to 1. Correct result should give me hit count 0 when i give querytext "Dhotre Anil" with the 0 slop value of QueryParser. Following is code snippet. QueryParser queryParser = new QueryParser("default", DEFAULT_ANALYZER); queryParser.setPhraseSlop(0); System.out.println("Slop : " + queryParser.getPhraseSlop()); Query query = queryParser.parse("Anil Dhotre","data",DEFAULT_ANALYZER) ; Hits hits = searcher.search(query); Note: index includes "Anil Dhotre" as part of indexed data. -- Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]