It sounds like you created a mapping for type pin but sent documents with 
location type.

I'd check the index creation command. Check the mapping for location.


--
David ;-)
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs

> Le 19 oct. 2014 à 18:51, Driton Alija <[email protected]> a écrit :
> 
> Hi all. I want to be able to search with geo distance in ES 1.3.4.
> I did geo mapping:
> POST /geo/
> { "mappings":{
> "pin" : {
> "properties" : {
> "location" : {
> "type" : "geo_point"
> }
> }
> }
> }
> }
> Added some data in this format:
> PUT /geo/location/1
> {
> "pin" : {
> "location" : {
> "lat" : 42.4398181,
> "lon" : 21.466074
> },
> "text" : "Geolocation distance search"
> }
> }
> Tried to search with geo_distance filter:
> POST geo/location/_search
> { 
> "query": {"filtered": {
> "query": {
> "match_all": {}},
> "filter": {
> "geo_distance": {
> "distance": "500",
> "distance_unit": "km", 
> "pin.location": {
> "lat" : 42.1,
> "lon" : 21.1
> }
> }
> }
> }}
> }
> And always getting 0 results even that this distance is 48.32 km.
> I tried many options and ES always returns 0 results to me.
> ( I used sense extension above)
> -- 
> 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 [email protected].
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/elasticsearch/fa9dc0f4-be05-4756-9cfb-3486cdd9a178%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elasticsearch/704BAA6D-0204-4073-8491-EA867A151207%40pilato.fr.
For more options, visit https://groups.google.com/d/optout.

Reply via email to