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

[source, python]
----
resp = client.search(
    index="child_example",
    size="0",
    aggs={
        "top-tags": {
            "terms": {
                "field": "tags.keyword",
                "size": 10
            },
            "aggs": {
                "to-answers": {
                    "children": {
                        "type": "answer"
                    },
                    "aggs": {
                        "top-names": {
                            "terms": {
                                "field": "owner.display_name.keyword",
                                "size": 10
                            }
                        }
                    }
                }
            }
        }
    },
)
print(resp)
----
