GET /_search
{
"query": {
"dis_max": {
"queries": [
{ "term": { "title": "iphone" } },
{ "term": { "body": "iphone" } }
],
// "tie_breaker": 0.7
}
}
}
ㄉ12121221 This is the official document written about dis_max:
Returns documents matching one or more wrapped queries, called query clauses or clauses.
If a returned document matches multiple query clauses, the dis_max query assigns the document the highest relevance score from any matching clause, plus a tie breaking increment for any additional matching subqueries.