I’m trying to achieve searches with wildcard characters but no luck with match and intervals query,
-
Alice * * * Bob: find all the documents that have a 5-word phrase starting with “Alice” followed by 3 words and then “Bob”.
-
Alice * * Bob * Sam: find all the documents that have a 6-word phrase starting with “Alice” followed by 2 words followed by “Bob” followed by one word and then “Sam”.
-
Alice? * * Bob: find all the documents that have a 4-word phrase starting with “Alice?”(? can be any character) followed by 2 words followed by “Bob".
I’ve tried following in the Elasticsearch:
Match phrase query did not work as the slop parameter was focusing on max distance and not exact distance.
Any guidance would be helpful here.