Unable to locate nested geopoint after updating to elasticsearch 2.3
Become part of the top 3% of the developers by applying to Toptal https://topt.al/25cXVn
--
Music by Eric Matyas
https://www.soundimage.org
Track title: Magic Ocean Looping
--
Chapters
00:00 Question
02:51 Accepted answer (Score 2)
03:10 Thank you
--
Full question
https://stackoverflow.com/questions/4163...
--
Content licensed under CC BY-SA
https://meta.stackexchange.com/help/lice...
--
Tags
#python #elasticsearch #elasticsearchdsl
#avk47
--
Music by Eric Matyas
https://www.soundimage.org
Track title: Magic Ocean Looping
--
Chapters
00:00 Question
02:51 Accepted answer (Score 2)
03:10 Thank you
--
Full question
https://stackoverflow.com/questions/4163...
--
Content licensed under CC BY-SA
https://meta.stackexchange.com/help/lice...
--
Tags
#python #elasticsearch #elasticsearchdsl
#avk47
ACCEPTED ANSWER
Score 2
This should work:
test_location = '53.5411062377, -2.11485504709'
test_distance = "3miles"
location_query = Q("geo_distance",
addresses__location=test_location,
distance=test_distance)
query = query.filter("nested",
path="addresses",
query=location_query)