Match geo_shape documents that intersect with documents that possess a certain keyword


#1

This query, slightly modified from the documentation, should match documents (shapes) that intersect the document (shape) with the id deu. Is it possible to modify this query so that it matches documents that intersect any document that possesses a particular keyword. So, an array of ids is passed in that match a particular keyword, rather than passing in a single id?

GET /example/_search
{
    "query": {
        "bool": {
            "must": {
                "match_all": {}
            },
            "filter": {
                "geo_shape": {
                    "location": {
                        "indexed_shape": {
                            "index": "shapes",
                            "type": "_doc",
                            "id": "deu",
                            "path": "location"
                        }
                    },
                    "relation": "intersects"
                }
            }
        }
    }
}

(system) #2

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