No results in query despite proper search results being in index


(Jay Zalowitz) #1

Does anyone have any advice for what I could be doing wrong?

Sample query:
{
"query": {
"filtered": {
"query": {
"match_all": {}
},
"filter": {
"geo_distance_range": {
"from": "1km",
"to": "40000km",
"profile.locationGeo": {
"lat": 40,
"lon": -70
}
}
}
}
}
}

Mappings include:
locationGeo: {
lat_lon: true
type: geo_point
geohash: true
}

One profile ex:
"locationGeo": {
"lat": 32.96179,
"lng": -96.8291685
}

--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/d9027778-af16-4cc5-80d4-2c2004457d9b%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


(Binh Ly) #2

Can you double check that your document actually is indexed with the fields
"lat" and "lon". So your example document should be indexed as:

"locationGeo": {
"lat": 32.96179,
"lon": -96.8291685
}

--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/a116842c-53a2-429b-94d8-5916bf4e993f%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


(system) #3