-
Notifications
You must be signed in to change notification settings - Fork 25.4k
Closed
Labels
:Analytics/GeoIndexing, search aggregations of geo points and shapesIndexing, search aggregations of geo points and shapes:Search/SearchSearch-related issues that do not fall into other categoriesSearch-related issues that do not fall into other categories>bugTeam:AnalyticsMeta label for analytical engine team (ESQL/Aggs/Geo)Meta label for analytical engine team (ESQL/Aggs/Geo)Team:SearchMeta label for search teamMeta label for search team
Description
Elasticsearch Version
main
Installed Plugins
No response
Java Version
bundled
OS Version
Problem Description
java.lang.ClassCastException: class org.elasticsearch.index.fielddata.plain.SortedDoublesIndexFieldData cannot be cast to class org.elasticsearch.index.fielddata.IndexGeoPointFieldData (org.elasticsearch.index.fielddata.plain.SortedDoublesIndexFieldData and org.elasticsearch.index.fielddata.IndexGeoPointFieldData are in module org.elasticsearch.server@9.1.0 of loader 'app')
at org.elasticsearch.server@9.1.0/org.elasticsearch.search.sort.GeoDistanceSortBuilder.fieldData(GeoDistanceSortBuilder.java:602)
at org.elasticsearch.server@9.1.0/org.elasticsearch.search.sort.GeoDistanceSortBuilder.build(GeoDistanceSortBuilder.java:508)
at org.elasticsearch.server@9.1.0/org.elasticsearch.search.sort.SortBuilder.buildSort(SortBuilder.java:161)
at org.elasticsearch.server@9.1.0/org.elasticsearch.search.sort.SortBuilder.buildSort(SortBuilder.java:153)
at org.elasticsearch.server@9.1.0/org.elasticsearch.search.SearchService.parseSource(SearchService.java:1574)
at org.elasticsearch.server@9.1.0/org.elasticsearch.search.SearchService.createContext(SearchService.java:1335)
at org.elasticsearch.server@9.1.0/org.elasticsearch.search.SearchService.executeQueryPhase(SearchService.java:869)
at org.elasticsearch.server@9.1.0/org.elasticsearch.search.SearchService.lambda$executeQueryPhase$7(SearchService.java:710)
at org.elasticsearch.server@9.1.0/org.elasticsearch.action.ActionRunnable$3.accept(ActionRunnable.java:79)
at org.elasticsearch.server@9.1.0/org.elasticsearch.action.ActionRunnable$3.accept(ActionRunnable.java:76)
at org.elasticsearch.server@9.1.0/org.elasticsearch.action.ActionRunnable$4.doRun(ActionRunnable.java:101)
at org.elasticsearch.server@9.1.0/org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:27)
at org.elasticsearch.server@9.1.0/org.elasticsearch.common.util.concurrent.TimedRunnable.doRun(TimedRunnable.java:35)
at org.elasticsearch.server@9.1.0/org.elasticsearch.common.util.concurrent.ThreadContext$ContextPreservingAbstractRunnable.doRun(ThreadContext.java:1044)
at org.elasticsearch.server@9.1.0/org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:27)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1095)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:619)
at java.base/java.lang.Thread.run(Thread.java:1447)
Steps to Reproduce
Found this in suppressed REST errors.
Logs (if relevant)
No response
Metadata
Metadata
Assignees
Labels
:Analytics/GeoIndexing, search aggregations of geo points and shapesIndexing, search aggregations of geo points and shapes:Search/SearchSearch-related issues that do not fall into other categoriesSearch-related issues that do not fall into other categories>bugTeam:AnalyticsMeta label for analytical engine team (ESQL/Aggs/Geo)Meta label for analytical engine team (ESQL/Aggs/Geo)Team:SearchMeta label for search teamMeta label for search team
Activity
elasticsearchmachine commentedon Jun 16, 2025
Pinging @elastic/es-core-infra (Team:Core/Infra)
elasticsearchmachine commentedon Jun 16, 2025
Pinging @elastic/es-search-relevance (Team:Search Relevance)
elasticsearchmachine commentedon Jun 16, 2025
Pinging @elastic/es-search-foundations (Team:Search Foundations)
10 remaining items
javanna commentedon Jul 8, 2025
I think it may be a case of doing geo_distance on the wrong field type. From the code, we don't seem to be checking the field type, we simply cast the fielddata impl to the expected one.
Check field data type before casting when applying geo distance sort
Check field data type before casting when applying geo distance sort (e…
Check field data type before casting when applying geo distance sort (e…
Check field data type before casting when applying geo distance sort (e…
Check field data type before casting when applying geo distance sort (e…
Check field data type before casting when applying geo distance sort (#…
Check field data type before casting when applying geo distance sort (#…
Check field data type before casting when applying geo distance sort (#…
Check field data type before casting when applying geo distance sort (#…
Check field data type before casting when applying geo distance sort (e…
Check field data type before casting when applying geo distance sort (e…