Skip to content

Commit

Permalink
[DOCS] Clarify max_shingle_size parm def (#53480)
Browse files Browse the repository at this point in the history
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)
  • Loading branch information
jrodewig committed Mar 13, 2020
1 parent 58924c0 commit 0e495a3
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions docs/reference/mapping/types/search-as-you-type.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -163,15 +163,18 @@ GET my_index/_search
The following parameters are accepted in a mapping for the `search_as_you_type`
field and are specific to this field type

[horizontal]

`max_shingle_size`::
+
--
(Optional, integer)
Largest shingle size to create. Valid values are `2` (inclusive) to `4`
(inclusive). Defaults to `3`.

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

More subfields enables more specific queries but increases index size.
--

[[general-params]]
==== Parameters of the field type as a text field
Expand Down

0 comments on commit 0e495a3

Please sign in to comment.