Skip to content

Commit 1e31031

Browse files
committed
[DOCS] Clarify max_shingle_size parm def (#53480)
Rewrites the `search_as_you_type` field datatype's `max_shingle_size` mapping parameter to improve clarity and better communicate trade-offs regarding index size. Relates to [elastic/kibana#55161][0]. Closes #51774. [0]: elastic/kibana#55161 (comment)
1 parent a867749 commit 1e31031

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

docs/reference/mapping/types/search-as-you-type.asciidoc

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -163,15 +163,18 @@ GET my_index/_search
163163
The following parameters are accepted in a mapping for the `search_as_you_type`
164164
field and are specific to this field type
165165

166-
[horizontal]
167-
168166
`max_shingle_size`::
167+
+
168+
--
169+
(Optional, integer)
170+
Largest shingle size to create. Valid values are `2` (inclusive) to `4`
171+
(inclusive). Defaults to `3`.
169172

170-
The largest shingle size to index the input with and create subfields for,
171-
creating one subfield for each shingle size between 2 and
172-
`max_shingle_size`. Accepts integer values between 2 and 4 inclusive. This
173-
option defaults to 3.
173+
A subfield is created for each integer between `2` and this value. For example,
174+
a value of `3` creates two subfields: `my_field._2gram` and `my_field._3gram`
174175

176+
More subfields enables more specific queries but increases index size.
177+
--
175178

176179
[[general-params]]
177180
==== Parameters of the field type as a text field

0 commit comments

Comments
 (0)