Reputation: 918
Here is a sweet link to the query, the results, the mapping, and one of many documents:
https://gist.github.com/1352021
I should also note that I tried geo_distance as well, which failed to return any documents. What am I doing wrong?
Upvotes: 0
Views: 1506
Reputation: 30163
In the document you don't need nested "location" and location should be specified in the [lon, lat] format:
"Location": [-118.47115, 33.98874],
In the query, the top left corner of the bounding box has to be the top left corner of the bounding box when you look at the map. There is also seems to be a typo in the latitude range (33.98874 in the doc vs 34-35 in the query). Try something like this:
"filter":{
"geo_bounding_box":{
"Location":{
"top_left":{
"lat":34.0,
"lon":-119.0
},
"bottom_right":{
"lat":33.0,
"lon":-118.0
}
}
}
}
Upvotes: 1