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

[source, python]
----
resp = client.search(
    aggs={
        "actors": {
            "terms": {
                "field": "actors",
                "size": 10
            },
            "aggs": {
                "costars": {
                    "terms": {
                        "field": "actors",
                        "size": 5
                    }
                }
            }
        }
    },
)
print(resp)
----
