I am analyzing some Elastic Search queries to understand the API better, and I am confused by these queries
"query": {
"function_score": {
"query": {
"bool": {
"must": {
"match": {
"title_normalized": {
"query": "here goes the query",
"minimum_should_match": 2
}
}
},
"filter": ...
},
},
},
}
how does minimum_should_match make sense in this context ? There is no should clause, but we are inside a match clause.
Similarly, here
"query": {
"function_score": {
"query": {
"bool": {
"must": ...
"filter": {
"bool": {
"should": [{
"match": {
"title_normalized": {
"query": "here goes",
"minimum_should_match": 2
}
}
}, {
"match": {
"title_normalized": {
"query": "the query",
"minimum_should_match": 2
}
}
}],
"minimum_should_match": 1
}
}
},
},
},
}
I understand the "minimum_should_match": 1 at the same indentation level as should, but what about the minimum_should_match nested within the match clauses? What do those mean?