From cd3a9be8808f6f75bb53e14419c9e87c536c4f7f Mon Sep 17 00:00:00 2001 From: James Rodewig Date: Thu, 12 Mar 2020 09:26:40 -0400 Subject: [PATCH 1/2] [DOCS] Clarify `max_shingle_size` parm def 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]. [0]: https://github.com/elastic/kibana/pull/55161#discussion_r368107177 --- .../mapping/types/search-as-you-type.asciidoc | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/docs/reference/mapping/types/search-as-you-type.asciidoc b/docs/reference/mapping/types/search-as-you-type.asciidoc index 75cb76a4faff4..20633091eab87 100644 --- a/docs/reference/mapping/types/search-as-you-type.asciidoc +++ b/docs/reference/mapping/types/search-as-you-type.asciidoc @@ -162,15 +162,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 enable more specific queries but increase index size. +-- [[general-params]] ==== Parameters of the field type as a text field From f889895e3ec8ebf389ddcf3ff6db623eee07dfbb Mon Sep 17 00:00:00 2001 From: James Rodewig Date: Thu, 12 Mar 2020 13:50:02 -0400 Subject: [PATCH 2/2] iter --- docs/reference/mapping/types/search-as-you-type.asciidoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/reference/mapping/types/search-as-you-type.asciidoc b/docs/reference/mapping/types/search-as-you-type.asciidoc index 20633091eab87..da4cb14ba9904 100644 --- a/docs/reference/mapping/types/search-as-you-type.asciidoc +++ b/docs/reference/mapping/types/search-as-you-type.asciidoc @@ -172,7 +172,7 @@ Largest shingle size to create. Valid values are `2` (inclusive) to `4` 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 enable more specific queries but increase index size. +More subfields enables more specific queries but increases index size. -- [[general-params]]