Query ES API for a Geofence Containing Most Docs

ES v5.6.2

I have a use case where I need to determine a geofence containing a large numbers of requests. It would be nice to get any geofence with >10% of requests, however this ask is flexible depending on what's possible..

Is there a good way to query ES for a geofence with something similar to the following filters:

  • geofence no larger than 10km x 10km
  • ordered by largest number of requests
  • a few filters I know how to set; e.g. Nginx-Response.keyword: 'Miss', last 4 hours, etc..

I'm seeing many options to return data via the ES API, however I'm not seeing anything regarding ES returning a geofence back.. curious if this is possible, being developed, or not on the development roadmap at this point..

Hi @seth.yes,

I realize you posted this 3 years ago. I just joined Elastic as the PM for Maps in Kibana. I am curious to know if you ever solved this problem?

Best,
Kent M.