I use Geo Distance Filter with ElasticSearch and no matter what distance I look for, elasticsearch 0.90.11 returns zero results.
Here's what I did: first, delete / create a new index with a geographic mapping:
curl -XDELETE 'http://localhost:9200/photos'
curl -XPOST 'http://localhost:9200/photos' -d '
{
"mappings": {
"pin" : {
"properties" : {
"location" : {
"type" : "geo_point"
}
}
}
}
}
'
Then add the document:
curl -XPOST 'http://localhost:9200/photos/photo?pretty=1' -d '
{
"pin" : {
"location" : {
"lat" : 46.8,
"lon" : -71.2
}
},
"file" : "IMG_2115.JPG"
}
'
Then do a search:
curl -XGET 'http://localhost:9200/photos/_search?pretty=1&size=20' -d '
{
"query" : {
"match_all" : {}
},
"filter" : {
"geo_distance" : {
"distance" : "10km",
"pin.location" : {
"lat" : "46.8",
"lon" : "-71.2"
}
}
}
}
'
But the search yields null images:
{
"took" : 2,
"timed_out" : false,
"_shards" : {
"total" : 5,
"successful" : 5,
"failed" : 0
},
"hits" : {
"total" : 0,
"max_score" : null,
"hits" : [ ]
}
}
- , ? , "" , "", "" , , , , , , "" "" json-.
...