Wildcard search

I’m trying to achieve searches with wildcard characters but no luck with match and intervals query,

  1. Alice * * * Bob: find all the documents that have a 5-word phrase starting with “Alice” followed by 3 words and then “Bob”.

  2. 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”.

  3. 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.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.