the query looks like this. basically query all the earthquake happened near San Diego within 300KMs.
and the results showing the individual earthquakes and the buckets aggregated.
you can grad the data source from USGS , I closed the CSV file here
to do the Indexing, first we define the mapping , I used Postman to do the REST call. My mapping looks like this,
once we have the mapping and Index, we can feed the data to ES using the Sense
tool. I put a small script to parse the CSV data to JSON following the Bulk
format.
like thisthen copy and paste the data we convered, basically tell the importer we want to create a new document called eq, then the doc itself