You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/reference/elasticsearch/mapping-reference/keyword.md
+9-1Lines changed: 9 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -70,7 +70,15 @@ The following parameters are accepted by `keyword` fields:
70
70
: Multi-fields allow the same string value to be indexed in multiple ways for different purposes, such as one field for search and a multi-field for sorting and aggregations.
: Do not index any string longer than this value. Defaults to `2147483647` in standard indices so that all values would be accepted, and `8191` in logsdb indices to protect against Lucene's term byte-length limit of `32766`. Please however note that default dynamic mapping rules create a sub `keyword` field that overrides this default by setting `ignore_above: 256`.
73
+
: Do not index any string with more characters than this value. This is important because `keyword`
74
+
fields will reject documents with `keyword` fields that encode to utf-8 longer than `32766` bytes.
75
+
If you need to never reject documents, this should have some value `<=8191`. All documents with
76
+
more characters will just skip building the index for this field.
77
+
The defaults are complicated. It's `2147483647` (effectively unbounded) in standard indices and
78
+
`8191` in logsdb indices. So, if unspecified, standard indices *can* reject documents. And logsdb indices
79
+
will index the document, but skip this field.
80
+
The [dynamic mapping](docs-content://manage-data/data-store/mapping/dynamic-mapping.md) for string fields
81
+
defaults to a `text` field with a sub-`keyword` field with an `ignore_above` of `256`.
: Should the field be quickly searchable? Accepts `true` (default) and `false`. `keyword` fields that only have [`doc_values`](/reference/elasticsearch/mapping-reference/doc-values.md) enabled can still be queried, albeit slower.
0 commit comments