Hello,
We are using phrase queries with a slop value to perform Near and Within style
searches and the issue we are encountering is as follows:
Since the slop value in the PhraseQuery is the edit-distance, a message with
the terms 'thank' and 'you' will be found with a query of field:"thank you"~1
but will not be found with a query of field:"you thank"~1. Currently to work
around this nuance I am creating a new query of field:("you thank"~1 OR "thank
you"~1).
Can I solve this by constructing a SpanNearQuery with two
SpanTermQuery("thank") and SpanTermQuery("you") and a slop value of 1 and the
ordering of false?
Thanks,
Ian Koelliker