OpenSearch/docs/reference/query-dsl/match-phrase-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

34 lines
940 B
Plaintext

[[query-dsl-match-query-phrase]]
=== Match Phrase Query
The `match_phrase` query analyzes the text and creates a `phrase` query
out of the analyzed text. For example:
[source,js]
--------------------------------------------------
{
"match_phrase" : {
"message" : "this is a test"
}
}
--------------------------------------------------
A phrase query matches terms up to a configurable `slop`
(which defaults to 0) in any order. Transposed terms have a slop of 2.
The `analyzer` can be set to control which analyzer will perform the
analysis process on the text. It defaults to the field explicit mapping
definition, or the default search analyzer, for example:
[source,js]
--------------------------------------------------
{
"match_phrase" : {
"message" : {
"query" : "this is a test",
"analyzer" : "my_analyzer"
}
}
}
--------------------------------------------------