Skip to content

[9.0] Check field data type before casting when applying geo distance sort (#130924) #131017

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 1 commit into from
Jul 10, 2025

Conversation

javanna
Copy link
Member

@javanna javanna commented Jul 10, 2025

Backports the following commits to 9.0:

…lastic#130924)

If a user tries to apply geo distance sorting to a field of the wrong type, they'll get
a 500 error that causes shard failures, because the field data impl gets casted to the
expected type without first checking that the field type is the one expected.
This commit addresses that by returning a 400 error instead.

Closes elastic#129500
@javanna javanna added :Search Foundations/Search Catch all for Search Foundations >bug auto-merge-without-approval Automatically merge pull request when CI checks pass (NB doesn't wait for reviews!) backport Team:Search Foundations Meta label for the Search Foundations team in Elasticsearch labels Jul 10, 2025
@elasticsearchmachine elasticsearchmachine merged commit fa77ba7 into elastic:9.0 Jul 10, 2025
17 checks passed
@javanna javanna deleted the backport/9.0/pr-130924 branch July 10, 2025 14:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto-merge-without-approval Automatically merge pull request when CI checks pass (NB doesn't wait for reviews!) backport >bug :Search Foundations/Search Catch all for Search Foundations Team:Search Foundations Meta label for the Search Foundations team in Elasticsearch v9.0.5
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants