// This file is autogenerated, DO NOT EDIT
// query-dsl/has-child-query.asciidoc:31

[source, python]
----
resp = client.indices.create(
    index="my-index-000001",
    mappings={
        "properties": {
            "my-join-field": {
                "type": "join",
                "relations": {
                    "parent": "child"
                }
            }
        }
    },
)
print(resp)
----
