Using multiple geo_points per document, return matched geo_point(s)

I index documents with each an array of geo_points. I am able to do a distance search returning only those documents with geo_points within a certain radius of another geo location.
Is there any way to determine which geo_points in the array matched my query?
I'd like to know which matched, so I can e.g. render them in a google maps layer as markers.

It seems this cannot be achieved this way. I managed to do it using parent child relationships, so my documents are parents of children with geopoints.
Doing this, I am able to do a has_child query on those children, and using inner_hits I get those children back that matched.

It'd be still interesting if there is a better way of doing this. It seems to me it should be very common use-case and I wonder why I can't find anything on this.

So if someone ever did something similar, I would love to know which approach was used.

I would be wary of using parent/child just to achieve the use case that you are doing here. It may prove easier to just do a client-side validation of geo points versus the radius. There are tons of libraries that will do that check for you, and given a small subset of documents it should be a cheap operation.

There are tons of libraries that enable this kind of behavior and it avoids the overhead that parent/child brings (both to complexity of code and the complexity added to the system).

Thank you for your thoughts... I can't foresee how many locations there will be right now... Besides that, I think this is something that the server should do. But you are right on the increased complexity... :confused: