// This file is autogenerated, DO NOT EDIT
// aggregations/bucket/terms-aggregation.asciidoc:543

[source, python]
----
resp = client.search(
    aggs={
        "tags": {
            "terms": {
                "field": "tags",
                "include": ".*sport.*",
                "exclude": "water_.*"
            }
        }
    },
)
print(resp)
----
