In reference to the bug no:36296

http://issues.apache.org/bugzilla/show_bug.cgi?id=36296
Hi Eric,
Thanks for the reply.
Query toString println was 
toString : data:dhotre data:anil


Then i changed my query text value to include escaped (") value.

something like this search("\"Dhotre Anil\"");

Now the result is I get 1 hot count for search("\"Anil Dhotre\""); and 
0 hit count for search("\"Dhotre Anil\"");
Following is the source snippet with SOP's below it.
   queryParser.setPhraseSlop(2);
   System.out.println("Slop : " + queryParser.getPhraseSlop());
   Query query = queryParser.parse(termsNameAndValues,"data",DEFAULT_ANALYZER) ;
   System.out.println("toString : " + query.toString());

Slop : 2
toString : data:"dhotre anil"
Hits count 0

 

Reply via email to