Skip to content

Conversation

@cbuescher
Copy link
Member

When a keyed flattened field that is composed of both the fields key, a separator
and the actual value, exceeds Lucenes term limit, the user currently gets a confusing
IAE that among other things only mentions the fields _keyed subfield as the source
of the offending long term. Since it might be both key and value that might trip this
we can check earlier and throw a nices IAE that reports both key and value lengths
and the prefix of the offending key.

Closes #78248

@cbuescher cbuescher added >enhancement :Search Foundations/Mapping Index mappings, including merging and defining field types v8.0.0 v7.16.1 v8.1.0 labels Nov 5, 2021
@elasticmachine elasticmachine added the Team:Search Meta label for search team label Nov 5, 2021
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-search (Team:Search)

Copy link
Contributor

@romseygeek romseygeek left a comment

Choose a reason for hiding this comment

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

LGTM, nice usability improvement.

@cbuescher
Copy link
Member Author

@elasticsearchmachine run elasticsearch-ci/rest-compatibility
@elasticsearchmachine run elasticsearch-ci/part-2

@cbuescher
Copy link
Member Author

@elasticmachine update branch

@cbuescher cbuescher added the auto-backport Automatically create backport pull requests when merged label Nov 8, 2021
@cbuescher cbuescher merged commit 4dc7d70 into elastic:master Nov 8, 2021
cbuescher pushed a commit to cbuescher/elasticsearch that referenced this pull request Nov 8, 2021
When a keyed ´flattened` field that is composed of both the fields key, a separator
and the actual value, exceeds Lucenes term limit, the user currently gets a confusing
IAE that among other things only mentions the fields `_keyed` subfield as the source
of the offending long term. Since it might be both key and value that might trip this
we can check earlier and throw a nices IAE that reports both key and value lengths
and the prefix of the offending key.

Closes elastic#78248
cbuescher pushed a commit to cbuescher/elasticsearch that referenced this pull request Nov 8, 2021
When a keyed ´flattened` field that is composed of both the fields key, a separator
and the actual value, exceeds Lucenes term limit, the user currently gets a confusing
IAE that among other things only mentions the fields `_keyed` subfield as the source
of the offending long term. Since it might be both key and value that might trip this
we can check earlier and throw a nices IAE that reports both key and value lengths
and the prefix of the offending key.

Closes elastic#78248
@elasticsearchmachine
Copy link
Collaborator

💚 Backport successful

Status Branch Result
8.0
7.16

cbuescher pushed a commit that referenced this pull request Nov 8, 2021
When a keyed ´flattened` field that is composed of both the fields key, a separator
and the actual value, exceeds Lucenes term limit, the user currently gets a confusing
IAE that among other things only mentions the fields `_keyed` subfield as the source
of the offending long term. Since it might be both key and value that might trip this
we can check earlier and throw a nices IAE that reports both key and value lengths
and the prefix of the offending key.

Closes #78248
cbuescher pushed a commit that referenced this pull request Nov 8, 2021
#80487)

When a keyed ´flattened` field that is composed of both the fields key, a separator
and the actual value, exceeds Lucenes term limit, the user currently gets a confusing
IAE that among other things only mentions the fields `_keyed` subfield as the source
of the offending long term. Since it might be both key and value that might trip this
we can check earlier and throw a nices IAE that reports both key and value lengths
and the prefix of the offending key.

Closes #78248
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 >enhancement :Search Foundations/Mapping Index mappings, including merging and defining field types Team:Search Meta label for search team v7.16.0 v8.0.0-rc2 v8.1.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ignore_above parameter does not apply to keys in a flattened field

6 participants