I have the following mapping:
mapping = """
{
"settings": {
"analysis": {
"analyzer" : "stop",
"normalizer": {
"lowercase_normalizer": {
"type": "custom",
"char_filter": [],
"filter": ["lowercase"]
}
}
}
},
"mappings": {
"document": {
"properties": {
"postal_codes" : {
"type" : "nested",
"properties" : {
"location": {
"type": "geo_point"
}
}
}
}
}
}
}
"""
But when I run the correct query (I believe) it returns no results:
GET /testing/_search
{
"query": {
"bool": {
"must": {
"match_all" : {}
},
"filter": {
"geo_distance" : {
"distance" : "1000km",
"postal_codes.location": {
"lat" : 43.5034,
"lon" : -79.8773
}
}
}
}
}
}
Even with a large distance and the exact coordinates I know exist in the index, it doesn't return any hits. I know the query works because when I ran a similar query without nested data, it returned the exact results it should have.
Any ideas what I'm doing wrong? Thanks,