In ElasticSearch8.5.1, sorted by longitude and latitude

In Elasticsearch8.5.1, sorted by longitude and latitude, my data format is:
Post_info_address_index:[

{

LatALng:{

Lat: 37.520804,

Lon: 121.219555

}

},

{

LatALng:{

Lat: 37.520496,

Lon: 121.220644

}

}

]

I use DSL statements in Kibana to achieve:
"sort": [
{
"_geo_distance": {
"order": "asc",
"unit": "km",
"nested": {
"path": "post_info_address_index"
},
"mode": "min",
"distance_type": "plane",
"post_info_address_index.latALng": {
"lat": 37.550855034722225,
"lon": 121.24978407118056
}
}
}
]

But in Java, I use the ElasticsearchClient client's sort sorting, and there is no nested

Hi, it sounds like this could be an issue in the elasticsearch-java client. Would you mind posting this as a new issue here: https://github.com/elastic/elasticsearch-java/issues/new?assignees=&labels=&projects=&template=bug.yml

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.