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


(Øystein Schrøder Elvik) #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


(Øystein Schrøder Elvik) #2

Is this a Bug?


(Shane Connelly) #3

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?


(Øystein Schrøder Elvik) #4

Yes, this looks like the same issue


(system) #5

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