-
Book Overview & Buying
-
Table Of Contents
-
Feedback & Rating

Elasticsearch 5.x Cookbook
By :

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.
To execute a geo_distance_range
query, we will perform the following steps:
Searching documents in which pin.location is 100km
to 200km
away from lat
40
and lon
, is done with a similar query:
curl -XGET 'http://127.0.0.1:9200/test-mindex...
Change the font size
Change margin width
Change background colour