How to perform GeoDistanceSort on a nested field using ES-8.5.3 JavaClient

We are using ElasticsearchClient instance to build our query and communicate with elasticsearch hosted on elastic-cloud version 8.5.3.

We could not find any information on how to inject nested path while creating GeoDistanceSort object.

Sort query that we are trying to convert to using Java:

          "mode" : "min",
          "distance_type" : "arc",
          "ignore_unmapped": true

Maven dependency:


We have referred to the following official elastic documentation for JavaClient 8.5.3:

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