July 2015
Intermediate to advanced
192 pages
3h 38m
English
Next, I need to consider only those restaurants that are inside a particular city limit; the rest are of no interest to me. As the city shown in the following map is rectangle in nature, this makes my job easier:

Now, to see whether a geo point is inside a rectangle, we can use the bounding box filter. A rectangle is marked when you feed the top-left point and bottom-right point.
Let's assume that the city is within the following rectangle with the top-left point as X and Y and the bottom-right point as A and B:
curl -XPOST 'http://localhost:9200/restaurants/_search' -d '{ "query": { "filtered": { "query": { "match_all": {} }, ...Read now
Unlock full access