Hello folks ! I'm looking for a way to search for a phrase, where in I shud get a hit even if some (N) words in the query phrase is not matching or even not inorder, i.e. it shud match maximum to the query string. I also need to get the Spans for the hits for highlighting.
SpanNearQuery is quite helpful with inorder set to false and for getting the spans. Is it possible to modify SpanNearQuery, so that it wud return the spans of the max match string ?? ---> The quick brown fox jumps over the lazy dog Query : quick brainy fox it should give me <quick brown fox>... We can prolly (must) have a parameter for N, the number of term mismatches allowed. It will surely be helpful in search also... Any thoughts ?? Regards... Jonny !