Geo_point and geohash - > geo_distance filter no results

Hi All

I'm unable to query/filter any documents with geo_point type stored as
geohash.

For more information please look into my example:

//create a index
curl -XPUT http://localhost:9200/geo-test
//added mappings
curl -XPUT http://localhost:9200/geo-test/index/_mapping -d '
{
"index": {
"properties": {
"g": {
"type": "geo_point",
"geohash" : true
}
}
}
}'

//insert a docs
curl -XPUT http://localhost:9200/geo-test/index/1 -d '{"g":"drm3btev3e86",
"name" : "one" }'
curl -XPUT http://localhost:9200/geo-test/index/2 -d '{"g":"u1044k2bd6u",
"name" : "two" }'

//search
curl -XGET http://localhost:9200/geo-test/_search?pretty=true -d '{
"query": {
"match_all": {}
},
"filter": {
"geo_distance": {
"distance": "12km",
"g": "drm3btev3e86"
}
}
}'

Result:
{
"took" : 1,
"timed_out" : false,
"_shards" : {
"total" : 5,
"successful" : 5,
"failed" : 0
},
"hits" : {
"total" : 0,
"max_score" : null,
"hits" : [ ]
}
}

Artur

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Hi Artur,

which version of ES are you using. I fixed a bug on the Geohases two weeks
ago. Maybe you can have a look at

--Florian

On Wednesday, June 19, 2013 11:31:18 PM UTC+2, Artur Konczak wrote:

Hi All

I'm unable to query/filter any documents with geo_point type stored as
geohash.

For more information please look into my example:

//create a index
curl -XPUT http://localhost:9200/geo-test
//added mappings
curl -XPUT http://localhost:9200/geo-test/index/_mapping -d '
{
"index": {
"properties": {
"g": {
"type": "geo_point",
"geohash" : true
}
}
}
}'

//insert a docs
curl -XPUT http://localhost:9200/geo-test/index/1 -d
'{"g":"drm3btev3e86", "name" : "one" }'
curl -XPUT http://localhost:9200/geo-test/index/2 -d '{"g":"u1044k2bd6u",
"name" : "two" }'

//search
curl -XGET http://localhost:9200/geo-test/_search?pretty=true -d '{
"query": {
"match_all": {}
},
"filter": {
"geo_distance": {
"distance": "12km",
"g": "drm3btev3e86"
}
}
}'

Result:
{
"took" : 1,
"timed_out" : false,
"_shards" : {
"total" : 5,
"successful" : 5,
"failed" : 0
},
"hits" : {
"total" : 0,
"max_score" : null,
"hits" :
}
}

Artur

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Hi Florian

I have tested that against 0.90.0 and 0.90.1 and in both cases the result
was the same.

Artur

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.