Slow geo_shape filter

Hello,

I have a set of about 250,000 polygons. Each of them contains a field
called geo, containing a geo_shape value (polygons). Querying against it
using a construct like this:

{
"fields": [],
"query": {
"match_all": {}
},
"filter": {
"geo_shape": {
"geo": {
"shape": {
"type": "Polygon",
"coordinates": [
... Points ...
]
}
}
}
}
}

causes a query time of multiple seconds. I tried using both quad trees and
geohashes. I am querying for estates using polygons of streets, districts,
etc. Is there a way to speed up my query?

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

Assuming you are using 0.90, try to reduce the precision or tree_levels in
the mapping for the field to a few hundred meters.

http://www.elasticsearch.org/guide/reference/mapping/geo-shape-type/

If you aren't using 0.90, you should upgrade because that release contains
several geo_shape related fixes.

I have a similar data set (flickr neighborhood polygons) of about over 200K
shapes of varying sizes. Especially things like continents and other large
polygons are very hard on the index. I basically use several types with
different precision/tree_levels. For things like countries, I don't need a
lot of accuracy.

Jilles

On Sunday, May 26, 2013 4:33:01 PM UTC+2, Christian Sturm wrote:

Hello,

I have a set of about 250,000 polygons. Each of them contains a field
called geo, containing a geo_shape value (polygons). Querying against it
using a construct like this:

{
"fields": [],
"query": {
"match_all": {}
},
"filter": {
"geo_shape": {
"geo": {
"shape": {
"type": "Polygon",
"coordinates": [
... Points ...
]
}
}
}
}
}

causes a query time of multiple seconds. I tried using both quad trees and
geohashes. I am querying for estates using polygons of streets, districts,
etc. Is there a way to speed up my query?

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