It's a common scenario to find documents distant from a single point (epicenter) in a range.
One example, is when you have indexed a list of points of interest (shops, monuments, airports, train stations, and so on) and you need to know how many of them are in the range between 100 and 200 kilometers.
You need an up-and-running Elasticsearch installation as we described in the Downloading and installing Elasticsearch recipe in Chapter 2, Downloading and Setup.
To execute curl
via the command line, you need to install curl
for your operating system.
To correct execute the following commands, you need an index populated with the chapter_07/populate_geo.sh
geoscript available in the online code.