OpenSearch/docs/reference/query-dsl/match-phrase-prefix-query.asciidoc
Colin Goodheart-Smithe c20c49963f [DOCS] update match query documentation
Now the `match` query has been split out into `match`, `match_phrase` and `match_phrase_prefix` we need to update the docs to remove the deprecated syntax
2016-04-06 15:44:22 +01:00

33 lines
960 B
Plaintext

[[query-dsl-match-query-phrase-prefix]]
=== Match Phrase Prefix Query
The `match_phrase_prefix` is the same as `match_phrase`, except that it
allows for prefix matches on the last term in the text. For example:
[source,js]
--------------------------------------------------
{
"match_phrase_prefix" : {
"message" : "this is a test"
}
}
--------------------------------------------------
It accepts the same parameters as the phrase type. In addition, it also
accepts a `max_expansions` parameter that can control to how many
prefixes the last term will be expanded. It is highly recommended to set
it to an acceptable value to control the execution time of the query.
For example:
[source,js]
--------------------------------------------------
{
"match_phrase_prefix" : {
"message" : {
"query" : "this is a test",
"max_expansions" : 10
}
}
}
--------------------------------------------------