How to know which GeoPoint is hit while sorting on GeoPoint field containing multiple points

HI,
I am new at using Elasticsearch. I have an index which has the GeoPoint field "Location" and each document can contains multiple points which are stored in GeoPoint field as array. Now, when I sort on the basis of this field, it works fine and shows the distance as per the nearest Point/Location. However, I want to know that wihle sorting which Point was hit to consider as nearest. For Example, if sorting is made on the basis of 2nd Point in the array then how can i get to know that it was the second point which was hit for sorting.

Here is my Mapping

"mappings" : {
      "properties" : {
        "Name" : {
          "type" : "text",
          "fields" : {
            "keyword" : {
              "type" : "keyword",
              "ignore_above" : 256
            }
          }
        },
        "locations" : {
          "type" : "geo_point"
        },
        "name" : {
          "type" : "text"
        }
      }
}

here is a test data

{
          "Name" : "Tayto",
          "locations" : [
            {
              "lat" : 33.6684951,
              "lon" : 73.0054092
            },
            {
              "lat" : 33.6679958,
              "lon" : 73.0260688
            }
          ]
        }

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