Multi-match query #
Returns documents that match a provided text across several fields —
like the
match query, with per-field boosts and
multi-field scoring strategies.
Inside a
nestedquery: supported — fields under the nested path are matched per array element.
Examples #
POST /my-collection/_search
{
"query": {
"multi_match": {
"query": "search engine",
"fields": ["title^3", "description"]
}
}
}
Parameters for multi_match
#
query
(Required, string) The query text to search for.fields
(Required, array of strings) Fields to search, with optional per-field boosts via thefield^boostsyntax (e.g."title^3").type
(Optional, string) Match type / multi-field scoring strategy:best_fields(default — score of the best-matching field, plustie_breakertimes the others),most_fields(sum) orcross_fields.operator
(Optional, string, default:or) Boolean operator joining terms within each field:ororand.minimum_should_match
(Optional, string) Minimum number ofshouldclauses that must match. Defaults to 1 (at least one field must match).analyzer
(Optional, string) Analyzer override forwarded to the per-field match queries.tie_breaker
(Optional, float, default:0) Tie-breaker multiplier forbest_fields: score from the best-matching field plustie_breaker * scorefrom the other fields.boost
(Optional, float, default:1.0) Boost applied to the overall query.type(wire aliasmatch_type)
(Optional, string) Multi-field scoring strategy:best_fields(max score across fields, default),most_fields(sum),cross_fields,phrase,phrase_prefix.