// This file is autogenerated, DO NOT EDIT
// query-dsl/geo-shape-query.asciidoc:189

[source, python]
----
resp = client.indices.create(
    index="shapes",
    mappings={
        "properties": {
            "location": {
                "type": "geo_shape"
            }
        }
    },
)
print(resp)

resp1 = client.index(
    index="shapes",
    id="deu",
    document={
        "location": {
            "type": "envelope",
            "coordinates": [
                [
                    13,
                    53
                ],
                [
                    14,
                    52
                ]
            ]
        }
    },
)
print(resp1)

resp2 = client.search(
    index="example",
    query={
        "bool": {
            "filter": {
                "geo_shape": {
                    "location": {
                        "indexed_shape": {
                            "index": "shapes",
                            "id": "deu",
                            "path": "location"
                        }
                    }
                }
            }
        }
    },
)
print(resp2)
----
