// This file is autogenerated, DO NOT EDIT
// mapping/types/parent-join.asciidoc:22

[source, python]
----
resp = client.indices.create(
    index="my-index-000001",
    mappings={
        "properties": {
            "my_id": {
                "type": "keyword"
            },
            "my_join_field": {
                "type": "join",
                "relations": {
                    "question": "answer"
                }
            }
        }
    },
)
print(resp)
----
