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

[source, python]
----
resp = client.search(
    index="my_locations",
    size=0,
    aggs={
        "grouped": {
            "geohex_grid": {
                "field": "location",
                "precision": 1
            }
        }
    },
)
print(resp)
----
