Say I have a field "Message" and some indexed values "quick brown fox", "foxy brownie" in documents. Is there an API in Elasticsearch that I can use to ask question like How have we matched "brown fox" in "Message" of all the documents? and the result returns are
- document 1 "Message" : "quick brown fox", matched: ["match", "match_phrase", "phonetic"]
- document 2 "Message" : "foxy brownie", matched: ["phonetic", "token_count", "fuzzy", "edge_ngram"]
i.e. Given a querying value, I want to know all the matched types within all configured analysers/filters/query types in the mapping.
I think the dumbest way to achieve the same is to ask separate queries per each configured type, like Does "brown fox" match any document phonetically? Does "brown fox" match any document with the same number of tokens? Is there a handy API that does all this in a single query manner?