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