Skip to content

Commit febe7af

Browse files
authored
[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 f0ec898 commit febe7af

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
@@ -162,15 +162,18 @@ GET my_index/_search
162162
The following parameters are accepted in a mapping for the `search_as_you_type`
163163
field and are specific to this field type
164164

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

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

175+
More subfields enables more specific queries but increases index size.
176+
--
174177

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

0 commit comments

Comments
 (0)