Skip to content

Commit 80039d6

Browse files
Update match-phrase-query.asciidoc (elastic#118828) (elastic#121035)
(cherry picked from commit 8e9cccb) Co-authored-by: Damien RENIER <[email protected]>
1 parent abad04d commit 80039d6

File tree

1 file changed

+36
-2
lines changed

1 file changed

+36
-2
lines changed

docs/reference/query-dsl/match-phrase-query.asciidoc

Lines changed: 36 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,45 @@ GET /_search
1919
}
2020
--------------------------------------------------
2121

22+
[[match-phrase-field-params]]
23+
==== Parameters for `<field>`
24+
`query`::
25+
+
26+
--
27+
(Required) Text, number, boolean value or date you wish to find in the provided
28+
`<field>`.
29+
--
30+
31+
`analyzer`::
32+
(Optional, string) <<analysis,Analyzer>> used to convert the text in the `query`
33+
value into tokens. Defaults to the <<specify-index-time-analyzer,index-time
34+
analyzer>> mapped for the `<field>`. If no analyzer is mapped, the index's
35+
default analyzer is used.
36+
37+
`slop`::
38+
(Optional, integer) Maximum number of positions allowed between matching tokens.
39+
Defaults to `0`. Transposed terms have a slop of `2`.
40+
41+
`zero_terms_query`::
42+
+
43+
--
44+
(Optional, string) Indicates whether no documents are returned if the `analyzer`
45+
removes all tokens, such as when using a `stop` filter. Valid values are:
46+
47+
`none` (Default)::
48+
No documents are returned if the `analyzer` removes all tokens.
49+
50+
`all`::
51+
Returns all documents, similar to a <<query-dsl-match-all-query,`match_all`>>
52+
query.
53+
--
54+
2255
A phrase query matches terms up to a configurable `slop`
2356
(which defaults to 0) in any order. Transposed terms have a slop of 2.
2457

58+
[[query-dsl-match-query-phrase-analyzer]]
59+
===== Analyzer in the match phrase query
60+
2561
The `analyzer` can be set to control which analyzer will perform the
2662
analysis process on the text. It defaults to the field explicit mapping
2763
definition, or the default search analyzer, for example:
@@ -40,5 +76,3 @@ GET /_search
4076
}
4177
}
4278
--------------------------------------------------
43-
44-
This query also accepts `zero_terms_query`, as explained in <<query-dsl-match-query, `match` query>>.

0 commit comments

Comments
 (0)