Fix dropped ignore above fields#137394
Merged
jordan-powers merged 6 commits intoelastic:mainfrom Oct 31, 2025
Merged
Conversation
Collaborator
|
Pinging @elastic/es-storage-engine (Team:StorageEngine) |
Collaborator
|
Hi @jordan-powers, I've created a changelog YAML for you. |
Kubik42
reviewed
Oct 30, 2025
| * Returns whether values are potentially ignored, either by an explicitly configured ignore_above or by the default value. | ||
| */ | ||
| public boolean valuesPotentiallyIgnored() { | ||
| return get() != Integer.MAX_VALUE; |
Contributor
There was a problem hiding this comment.
[nit] can you leave a comment explaining why Integer.MAX_VALUE is used here? Otherwise its use clashes with the default value for ignore_above for non-logsdb indices, which is confusing.
Kubik42
approved these changes
Oct 30, 2025
Contributor
Kubik42
left a comment
There was a problem hiding this comment.
Left one minor comment, but looks good otherwise. Thanks!
Collaborator
�� Backport failed
You can use sqren/backport to manually backport by running |
jordan-powers
added a commit
to jordan-powers/elasticsearch
that referenced
this pull request
Oct 31, 2025
Currently, the CompositeSyntheticFieldLoaders for the various text-family field mappers only load the stored fields containing the original non-ignored values if ignore_above is set to a non-default value. But if a value is ignored due to hitting a default ignore_above limit, it won't be loaded by the field loader. This PR corrects that logic. Fixes elastic#137360. Co-authored-by: Felix Barnsteiner <felixbarny@users.noreply.github.com> (cherry picked from commit 61025ff) # Conflicts: # modules/mapper-extras/src/main/java/org/elasticsearch/index/mapper/extras/MatchOnlyTextFieldMapper.java # server/src/main/java/org/elasticsearch/index/mapper/KeywordFieldMapper.java # server/src/main/java/org/elasticsearch/index/mapper/TextFieldMapper.java
jordan-powers
added a commit
to jordan-powers/elasticsearch
that referenced
this pull request
Oct 31, 2025
Currently, the CompositeSyntheticFieldLoaders for the various text-family field mappers only load the stored fields containing the original non-ignored values if ignore_above is set to a non-default value. But if a value is ignored due to hitting a default ignore_above limit, it won't be loaded by the field loader. This PR corrects that logic. Fixes elastic#137360. Co-authored-by: Felix Barnsteiner <felixbarny@users.noreply.github.com> (cherry picked from commit 61025ff) # Conflicts: # modules/mapper-extras/src/main/java/org/elasticsearch/index/mapper/extras/MatchOnlyTextFieldMapper.java # server/src/main/java/org/elasticsearch/index/mapper/KeywordFieldMapper.java # server/src/main/java/org/elasticsearch/index/mapper/TextFieldMapper.java
Contributor
Author
💚 All backports created successfully
Questions ?Please refer to the Backport tool documentation |
elasticsearchmachine
pushed a commit
that referenced
this pull request
Oct 31, 2025
* Fix dropped ignore above fields (#137394) Currently, the CompositeSyntheticFieldLoaders for the various text-family field mappers only load the stored fields containing the original non-ignored values if ignore_above is set to a non-default value. But if a value is ignored due to hitting a default ignore_above limit, it won't be loaded by the field loader. This PR corrects that logic. Fixes #137360. Co-authored-by: Felix Barnsteiner <felixbarny@users.noreply.github.com> (cherry picked from commit 61025ff) # Conflicts: # modules/mapper-extras/src/main/java/org/elasticsearch/index/mapper/extras/MatchOnlyTextFieldMapper.java # server/src/main/java/org/elasticsearch/index/mapper/KeywordFieldMapper.java # server/src/main/java/org/elasticsearch/index/mapper/TextFieldMapper.java * [CI] Auto commit changes from spotless --------- Co-authored-by: elasticsearchmachine <infra-root+elasticsearchmachine@elastic.co>
elasticsearchmachine
pushed a commit
that referenced
this pull request
Oct 31, 2025
* Fix dropped ignore above fields (#137394) Currently, the CompositeSyntheticFieldLoaders for the various text-family field mappers only load the stored fields containing the original non-ignored values if ignore_above is set to a non-default value. But if a value is ignored due to hitting a default ignore_above limit, it won't be loaded by the field loader. This PR corrects that logic. Fixes #137360. Co-authored-by: Felix Barnsteiner <felixbarny@users.noreply.github.com> (cherry picked from commit 61025ff) # Conflicts: # modules/mapper-extras/src/main/java/org/elasticsearch/index/mapper/extras/MatchOnlyTextFieldMapper.java # server/src/main/java/org/elasticsearch/index/mapper/KeywordFieldMapper.java # server/src/main/java/org/elasticsearch/index/mapper/TextFieldMapper.java * [CI] Auto commit changes from spotless --------- Co-authored-by: elasticsearchmachine <infra-root+elasticsearchmachine@elastic.co>
elasticsearchmachine
pushed a commit
that referenced
this pull request
Oct 31, 2025
* Fix dropped ignore above fields (#137394) Currently, the CompositeSyntheticFieldLoaders for the various text-family field mappers only load the stored fields containing the original non-ignored values if ignore_above is set to a non-default value. But if a value is ignored due to hitting a default ignore_above limit, it won't be loaded by the field loader. This PR corrects that logic. Fixes #137360. Co-authored-by: Felix Barnsteiner <felixbarny@users.noreply.github.com> (cherry picked from commit 61025ff) # Conflicts: # modules/mapper-extras/src/main/java/org/elasticsearch/index/mapper/extras/MatchOnlyTextFieldMapper.java # server/src/main/java/org/elasticsearch/index/mapper/KeywordFieldMapper.java # server/src/main/java/org/elasticsearch/index/mapper/TextFieldMapper.java * [CI] Auto commit changes from spotless --------- Co-authored-by: elasticsearchmachine <infra-root+elasticsearchmachine@elastic.co>
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Currently, the
CompositeSyntheticFieldLoadersfor the various text-family field mappers only load the stored fields containing the original non-ignored values if ignore_above is set to a non-default value. But if a value is ignored due to hitting a default ignore_above limit, it won't be loaded by the field loader. This PR corrects that logic.Fixes #137360.