Bug? Geo_shape query not working for points_only geo_shape field in ES6.2.1

To reproduce:

DELETE /example

PUT /example
{
    "mappings": {
        "_doc": {
            "properties": {
                "location": {
                    "type": "geo_shape",
                    "points_only": true
                }
            }
        }
    }
}

POST /example/_doc?refresh
{
    "name": "Wind & Wetter, Berlin, Germany",
    "location": {
        "type": "point",
        "coordinates": [13.400544, 52.530286]
    }
}

GET /example/_search
{
    "query":{
        "bool": {
            "must": {
                "match_all": {}
            },
            "filter": {
                "geo_shape": {
                    "location": {
                        "shape": {
                            "type": "envelope",
                            "coordinates" : [[13.0, 53.0], [14.0, 52.0]]
                        },
                        "relation": "within"
                    }
                }
            }
        }
    }
}

Result in no hits when we should expect 1 hit

Is this a Bug?

You may be running into the same as https://github.com/elastic/elasticsearch/issues/28744 which has a PR to fix it (https://github.com/elastic/elasticsearch/pull/28774). Can you confirm that this used to work before 6.1 for you?

Yes, this looks like the same issue

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.