-
Notifications
You must be signed in to change notification settings - Fork 25.6k
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
Merged
Merged
Explain ignore_above
better
#129284
Changes from 3 commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
5d6fc66
Explain `ignore_above` better
nik9000 c1c509d
Format
nik9000 6f9f2bb
Explain more
nik9000 c3c7206
Apply suggestions from code review
nik9000 eaefb8d
More
nik9000 36f91e8
Merge branch 'main' into esql_explain_ignore_above
nik9000 0806dbd
Better words
nik9000 3974e6c
Apply suggestions from code review
nik9000 89654f0
Merge branch 'main' into esql_explain_ignore_above
nik9000 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -70,7 +70,19 @@ 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 string with more characters than this value. This is important because `keyword` | ||
fields will reject documents with `keyword` fields that encode to utf-8 longer than `32766` bytes. | ||
|
||
If you need to never reject documents, this should have some value `<=8191`. All documents with | ||
more characters will just skip building the index for this field. | ||
nik9000 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
||
The defaults are complicated. It's `2147483647` (effectively unbounded) in standard indices and | ||
|
||
`8191` in logsdb indices. So, if unspecified, standard indices *can* reject documents. And logsdb indices | ||
will index the document, but skip this field. | ||
|
||
The [dynamic mapping](docs-content://manage-data/data-store/mapping/dynamic-mapping.md) for string fields | ||
defaults to a `text` field with a sub-`keyword` field with an `ignore_above` of `256`. This indexes | ||
all values for full text search, and indexes short values get indexed for exact matching and aggregation. | ||
|
||
[`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. | ||
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.