I'm querying my elasticsearch index with a bool query. The query itself has a structure similar to this
{
"query": {
"bool": {
"should": [
{"multi_match": {
"fields": ["field1", "field2"],
"query": self.cleaned_stemmed_phrase,
"type": "phrase",
"fuzziness":"AUTO"
}},
{"multi_match": {
"fields": ["field3"],
"query": self.cleaned_stemmed_phrase,
"fuzziness":"AUTO",
"boost": 4
}},
{"multi_match": {
"fields": ["field4"],
"query": self.cleaned_stemmed_phrase,
"fuzziness":"AUTO"
}},
{"multi_match": {
"fields": ["field5", "filed6"],
"query": self.spaces_removed,
"fuzziness":"AUTO"
}},
{"multi_match": {
"fields": ["field7", "field8"],
"query": self.no_space_stems,
"fuzziness":"AUTO"
}}
]
}
}
}
I want to be able to identify which of all these queries was the one (ones) that matched results. Is there a built-in method of elasticsearch that allows this or do I have to manually do it?