@@ -19,9 +19,45 @@ GET /_search
19
19
}
20
20
--------------------------------------------------
21
21
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
+
22
55
A phrase query matches terms up to a configurable `slop`
23
56
(which defaults to 0) in any order. Transposed terms have a slop of 2.
24
57
58
+ [[query-dsl-match-query-phrase-analyzer]]
59
+ ===== Analyzer in the match phrase query
60
+
25
61
The `analyzer` can be set to control which analyzer will perform the
26
62
analysis process on the text. It defaults to the field explicit mapping
27
63
definition, or the default search analyzer, for example:
@@ -40,5 +76,3 @@ GET /_search
40
76
}
41
77
}
42
78
--------------------------------------------------
43
-
44
- This query also accepts `zero_terms_query`, as explained in <<query-dsl-match-query, `match` query>>.
0 commit comments