-
Notifications
You must be signed in to change notification settings - Fork 25.3k
Explain ignore_above
better
#129284
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Explain ignore_above
better
#129284
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | |||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -70,7 +70,21 @@ The following parameters are accepted by `keyword` fields: | ||||||||||
: 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. | |||||||||||
|
|||||||||||
[`ignore_above`](/reference/elasticsearch/mapping-reference/ignore-above.md) | |||||||||||
: 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`. | |||||||||||
: Do not index any field containing a string with more characters than this value. This is important because {{es}} | |||||||||||
will reject entire documents if they contain keyword fields that exceed `32766` bytes when UTF-8 encoded. | |||||||||||
|
|||||||||||
To avoid any risk of document rejection, set this value to `8191` or less. Fields with strings exceeding this | |||||||||||
length will be excluded from indexing. | |||||||||||
|
|||||||||||
The defaults are complicated: | |||||||||||
* Standard indices: `2147483647` (effectively unbounded). Documents containing `keyword` fields longer than `32766` | |||||||||||
bytes will be rejected. | |||||||||||
* `logsdb` indices: `8191`. `keyword` fields longer than `8191` characters won't be indexed, but the documents are | |||||||||||
accepted and the values unindexed values are available from `_source. | |||||||||||
Comment on lines
+79
to
+83
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What about a table for this information?
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ahh I see this is in definition list already, so maybe a table won't work. But if you like my wording you can update accordingly. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Me like that wording :) |
|||||||||||
* The [dynamic mapping](docs-content://manage-data/data-store/mapping/dynamic-mapping.md) for string fields | |||||||||||
defaults to a `text` field with a [sub](/reference/elasticsearch/mapping-reference/multi-fields.md)-`keyword` | |||||||||||
field with an `ignore_above` of `256`. String fields longer than 256 characters are available for full text | |||||||||||
search but won't have a value in their `.keyword` sub-field they can not do exact matching over _search. | |||||||||||
Comment on lines
+84
to
+87
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This part I struggle to understand. But it feels separate from the defaults above? Maybe this can be in a new paragraph. I think you're saying that...
|
|||||||||||
|
|||||||||||
[`index`](/reference/elasticsearch/mapping-reference/mapping-index.md) | |||||||||||
: 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. | |||||||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this work on text fields? Or only keyword fields?
Also further down you say:
Does the previous statement only apply to logsdb indices? Or to standard indices as well? If both, that feels important.
What about this: