How to display unique values of a field of documents with geopoints contained in a geoshape

Hello all,

I have documents with a Geopoint and ID field. I can have several documents with same ID. I want to list in a data table the unique id with a geopoint contained in a geoshape.

How can I do that ? I am considering of taking the geoshape bounds from an area selection from the coordinate map.

Thanks,

I'm not sure if I understand the question correctly, so correct me if I'm wrong, but it sounds like you want to display all of the unique IDs that appear within particular geoshapes, displayed in a table?

If that's correct, I think you can achieve this with a terms agg nested under a filters agg. In the visualization editor, first click "Split Rows" and select the Filters aggregation. Add all of the geo shape queries you want. Now click "Add sub-buckets", "Split rows" again, and select a Terms aggregation and configure it for your ID field.

Thanks @Bargs, it works :smiley:

1 Like

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