Why are bounding box geo queries so slow?

The full query actually looks like this:

{
"query": {
"filtered": {
"query": {
"match_all": {}
},
"filter": {
"bool": {
"must": [
{
"geo_bounding_box": {
"meta.bid_request.device.geo.loc": {
"top_left": {
"lat": 36.733602161826056,
"lon": -120.38100948440444
},
"bottom_right": {
"lat": 33.03261333655745,
"lon": -115.86899051559556
}
}
}
}
]
}
}
}
},
"fields": [
"udid",
"meta.bid_request.device.carrier",
"meta.bid_request.device.os",
"meta.bid_request.app.name",
"meta.bid_request.app.global_aid",
"meta.bid_request.device.geo.loc",
"meta.bid_request.device.osv"
]
}

I removed the "fields" entry from the original post because it did not have
any impact on performance whether it was there or not.

On Thursday, April 25, 2013 12:37:39 PM UTC-7, Jason wrote:

Same result. Actually my initial post was wrong. Your query is more like
what I am using. I have tried both variants.

On Thursday, April 25, 2013 10:59:35 AM UTC-7, David Pilato wrote:

What happens if you change it to:

{
"query": {
"filtered": {
"query": {
"match_all": {}
},
"filter": {
"geo_bounding_box": {
"meta.bid_request.device.geo.loc": {
"top_left": {
"lat": 47.55,
"lon": -122.06
},
"bottom_right": {
"lat": 47.52,
"lon": -122.02
}
}
}
}
}
}
}

--
David Pilato | Technical Advocate | Elasticsearch.com
@dadoonet https://twitter.com/dadoonet | @elasticsearchfrhttps://twitter.com/elasticsearchfr
| @scrutmydocs https://twitter.com/scrutmydocs

Le 25 avr. 2013 à 19:20, Jason jason....@gmail.com a écrit :

{
"query": {
"filtered": {
"query": {
"match_all": {}
}
}
},
"filter": {
"geo_bounding_box": {
"meta.bid_request.device.geo.loc": {
"top_left": {
"lat": 47.55,
"lon": -122.06
},
"bottom_right": {
"lat": 47.52,
"lon": -122.02
}
}
}
}
}

--
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.