False positive results for spatial search

hi,

I got simple spatial field:
PRIMARY_GEOMETRY: {
type: "geo_shape"
}

I index following geometry
{"PRIMARY_GEOMETRY":
{"geometries":[
{"coordinates":[[[-87.6544,41.9677],[-87.6544,41.9717],[-87.6489,41.9717],[-87.6489,41.9677],[-87.6544,41.9677]]],"type":"Polygon"},
{"coordinates":[[[-87.6544,41.9472],[-87.6544,41.9513],[-87.6489,41.9513],[-87.6489,41.9472],[-87.6544,41.9472]]],"type":"Polygon"}
],"type":"GeometryCollection"}
}

and then I try to search with following query

{"query":{"filtered":{"query":{"geo_shape":{"PRIMARY_GEOMETRY":{"shape":{"coordinates":[[[-87.8826,41.6908],[-87.9127,41.7161],[-87.9382,41.7441],[-87.959,41.7743],[-87.9745,41.8062],[-87.9845,41.8392],[-87.989,41.873],[-87.9878,41.9069],[-87.9808,41.9404],[-87.9683,41.973],[-87.9505,42.0042],[-87.9274,42.0335],[-87.8997,42.0603],[-87.8676,42.0844],[-87.8317,42.1053],[-87.7925,42.1226],[-87.7507,42.1361],[-87.707,42.1456],[-87.662,42.1509],[-87.6164,42.152],[-87.571,42.1488],[-87.5266,42.1414],[-87.4837,42.1298],[-87.4431,42.1144],[-87.4055,42.0952],[-87.3715,42.0727],[-87.3415,42.0472],[-87.316,42.0191],[-87.2955,41.9888],[-87.2803,41.9569],[-87.2706,41.9237],[-87.2665,41.89],[-87.2681,41.8561],[-87.2754,41.8226],[-87.2882,41.79],[-87.3064,41.759],[-87.3296,41.7298],[-87.3574,41.7031],[-87.3895,41.6792],[-87.4254,41.6585],[-87.4643,41.6413],[-87.5059,41.6278],[-87.5493,41.6184],[-87.5939,41.6131],[-87.6391,41.6121],[-87.6841,41.6153],[-87.7282,41.6226],[-87.7708,41.6341],[-87.8111,41.6494],[-87.8486,41.6684],[-87.8826,41.6908]],[[-87.8818,41.6914],[-87.9117,41.7167],[-87.9372,41.7446],[-87.9578,41.7747],[-87.9733,41.8064],[-87.9834,41.8394],[-87.9878,41.873],[-87.9866,41.9068],[-87.9797,41.9402],[-87.9672,41.9727],[-87.9494,42.0038],[-87.9264,42.033],[-87.8988,42.0597],[-87.8668,42.0837],[-87.831,42.1045],[-87.792,42.1218],[-87.7503,42.1353],[-87.7067,42.1447],[-87.6618,42.15],[-87.6164,42.1511],[-87.5712,42.1479],[-87.5269,42.1405],[-87.4842,42.129],[-87.4438,42.1136],[-87.4063,42.0945],[-87.3723,42.0721],[-87.3424,42.0467],[-87.3171,42.0187],[-87.2967,41.9885],[-87.2815,41.9566],[-87.2718,41.9236],[-87.2677,41.8899],[-87.2693,41.8561],[-87.2766,41.8228],[-87.2894,41.7904],[-87.3074,41.7594],[-87.3306,41.7303],[-87.3583,41.7037],[-87.3903,41.6799],[-87.426,41.6592],[-87.4649,41.6421],[-87.5063,41.6287],[-87.5495,41.6193],[-87.594,41.614],[-87.6391,41.613],[-87.6839,41.6161],[-87.7279,41.6235],[-87.7703,41.6349],[-87.8105,41.6502],[-87.8479,41.6691],[-87.8818,41.6914]]],"type":"Polygon"}}}}}}}

https://lh3.googleusercontent.com/-akprdJOvsRM/VL1iIrXnTyI/AAAAAAAAEo4/C2ZC1OdZQz4/s1600/Screen%2BShot%2B2015-01-19%2Bat%2B1.58.30%2BPM.png
This query returns previously indexed polygons. The problem is that I am
querying for shapes interacting with thin ring and those two shapes should
not be interacting with it.

What could I be doing wrong here?

Thanks
Luke

--
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/8fabeb5e-eead-4d44-bf0a-74358841177a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

HI Luke,

This looks like a bug in the geo_shape query. I have raised the following
issue in the Elasticsearch repo:

Thanks for raising this.

Colin

On Monday, 19 January 2015 20:02:08 UTC, Lukasz Smoron wrote:

hi,

I got simple spatial field:
PRIMARY_GEOMETRY: {
type: "geo_shape"
}

I index following geometry
{"PRIMARY_GEOMETRY":
{"geometries":[

{"coordinates":[[[-87.6544,41.9677],[-87.6544,41.9717],[-87.6489,41.9717],[-87.6489,41.9677],[-87.6544,41.9677]]],"type":"Polygon"},

{"coordinates":[[[-87.6544,41.9472],[-87.6544,41.9513],[-87.6489,41.9513],[-87.6489,41.9472],[-87.6544,41.9472]]],"type":"Polygon"}
],"type":"GeometryCollection"}
}

and then I try to search with following query

{"query":{"filtered":{"query":{"geo_shape":{"PRIMARY_GEOMETRY":{"shape":{"coordinates":[[[-87.8826,41.6908],[-87.9127,41.7161],[-87.9382,41.7441],[-87.959,41.7743],[-87.9745,41.8062],[-87.9845,41.8392],[-87.989,41.873],[-87.9878,41.9069],[-87.9808,41.9404],[-87.9683,41.973],[-87.9505,42.0042],[-87.9274,42.0335],[-87.8997,42.0603],[-87.8676,42.0844],[-87.8317,42.1053],[-87.7925,42.1226],[-87.7507,42.1361],[-87.707,42.1456],[-87.662,42.1509],[-87.6164,42.152],[-87.571,42.1488],[-87.5266,42.1414],[-87.4837,42.1298],[-87.4431,42.1144],[-87.4055,42.0952],[-87.3715,42.0727],[-87.3415,42.0472],[-87.316,42.0191],[-87.2955,41.9888],[-87.2803,41.9569],[-87.2706,41.9237],[-87.2665,41.89],[-87.2681,41.8561],[-87.2754,41.8226],[-87.2882,41.79],[-87.3064,41.759],[-87.3296,41.7298],[-87.3574,41.7031],[-87.3895,41.6792],[-87.4254,41.6585],[-87.4643,41.6413],[-87.5059,41.6278],[-87.5493,41.6184],[-87.5939,41.6131],[-87.6391,41.6121],[-87.6841,41.6153],[-87.7282,41.6226],[-87.7708,41.6341],[-87.8111,41.6494],[-87.8486,41.6684],[-87.8826,41.6908]],[[-87.8818,41.6914],[-87.9117,41.7167],[-87.9372,41.7446],[-87.9578,41.7747],[-87.9733,41.8064],[-87.9834,41.8394],[-87.9878,41.873],[-87.9866,41.9068],[-87.9797,41.9402],[-87.9672,41.9727],[-87.9494,42.0038],[-87.9264,42.033],[-87.8988,42.0597],[-87.8668,42.0837],[-87.831,42.1045],[-87.792,42.1218],[-87.7503,42.1353],[-87.7067,42.1447],[-87.6618,42.15],[-87.6164,42.1511],[-87.5712,42.1479],[-87.5269,42.1405],[-87.4842,42.129],[-87.4438,42.1136],[-87.4063,42.0945],[-87.3723,42.0721],[-87.3424,42.0467],[-87.3171,42.0187],[-87.2967,41.9885],[-87.2815,41.9566],[-87.2718,41.9236],[-87.2677,41.8899],[-87.2693,41.8561],[-87.2766,41.8228],[-87.2894,41.7904],[-87.3074,41.7594],[-87.3306,41.7303],[-87.3583,41.7037],[-87.3903,41.6799],[-87.426,41.6592],[-87.4649,41.6421],[-87.5063,41.6287],[-87.5495,41.6193],[-87.594,41.614],[-87.6391,41.613],[-87.6839,41.6161],[-87.7279,41.6235],[-87.7703,41.6349],[-87.8105,41.6502],[-87.8479,41.6691],[-87.8818,41.6914]]],"type":"Polygon"}}}}}}}

https://lh3.googleusercontent.com/-akprdJOvsRM/VL1iIrXnTyI/AAAAAAAAEo4/C2ZC1OdZQz4/s1600/Screen%2BShot%2B2015-01-19%2Bat%2B1.58.30%2BPM.png
This query returns previously indexed polygons. The problem is that I am
querying for shapes interacting with thin ring and those two shapes should
not be interacting with it.

What could I be doing wrong here?

Thanks
Luke

--
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/186e5f9e-7512-400c-bfcc-88b572a11e2c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.