I have an elastic index with many documents. A document represents some event. Every event has a date and geolocation.
I would like to send queries like these: "Some event in LA", "Some event tomorrow", "Some event near me"...
How could I build this solution with elastic?
Elasticsearch have some tools to do that simple. For example we have a pin in a specific location (lat, long) like this:
To search in a range of 200km we can do a query like this:
Is really easy And for dates you can use the a range query like this:
For more example take a look in the documentation https://www.elastic.co/guide/en/elasticsearch/guide/current/geoloc.html https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-range-query.html