-
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
Open
nik9000
wants to merge
5
commits into
elastic:main
Choose a base branch
from
nik9000:esql_explain_ignore_above
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+15
−1
Open
Explain ignore_above
better
#129284
Changes from 3 commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
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.
Show resolved
Hide resolved
|
||
|
||
The defaults are complicated. It's `2147483647` (effectively unbounded) in standard indices and | ||
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. Consider using bullets for defaults/dynamic mapping info for readability |
||
`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.