Geo Query not working for me


(smruti) #1

Hi,

Geo tagging feature is not working for me. Can someone please guide me.

Query:

curl -XGET localhost:9200/twitter/tweet/_search -d "{"query":{"filtered":{"query" : {"match_all":{}},"filter" : {"geo_distance":{ "distance": "200km", "location":[ 12.970000000000001,77.
590000000000003] }}}}}"

Result:
{"_shards":{"total":5,"successful":5,"failed":0},"hits":{"total":0,"max_score":n
ull,"hits":[]}}

Mapping File:
....,"location":"geohash_precision":12,"lat_lon":true,"path":"full","resolution":"64","type":"geo_point","geohash":false},...

Stored Index:
"location": [12.970000000000001, 77.590000000000003]}}]}}

As the mapping file seems correct and the query also returns proper result with out geo filter. I am not sure what is happening wrong here.

Thank


(system) #2