Skip to content

Conversation

@jordan-powers
Copy link
Contributor

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.

@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/es-storage-engine (Team:StorageEngine)

@elasticsearchmachine
Copy link
Collaborator

Hi @jordan-powers, I've created a changelog YAML for you.

* 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;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[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.

Copy link
Contributor

@Kubik42 Kubik42 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left one minor comment, but looks good otherwise. Thanks!

@jordan-powers jordan-powers merged commit 61025ff into elastic:main Oct 31, 2025
34 checks passed
@elasticsearchmachine
Copy link
Collaborator

💔 Backport failed

Status Branch Result
9.2 Commit could not be cherrypicked due to conflicts
8.19 Commit could not be cherrypicked due to conflicts
9.1 Commit could not be cherrypicked due to conflicts

You can use sqren/backport to manually backport by running backport --upstream elastic/elasticsearch --pr 137394

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 <[email protected]>
(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 <[email protected]>
(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
Copy link
Contributor Author

💚 All backports created successfully

Status Branch Result
9.2
9.1
8.19

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 <[email protected]>
(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 <[email protected]>
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 <[email protected]>
(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 <[email protected]>
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 <[email protected]>
(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 <[email protected]>
Copy link
Member

@martijnvg martijnvg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM2!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

auto-backport Automatically create backport pull requests when merged >bug :StorageEngine/Mapping The storage related side of mappings Team:StorageEngine v8.19.7 v9.1.7 v9.2.1 v9.3.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

LogsDB: Large stack traces not available in synthetic _source

4 participants