// This file is autogenerated, DO NOT EDIT
// query-dsl/nested-query.asciidoc:139

[source, python]
----
resp = client.indices.create(
    index="drivers",
    mappings={
        "properties": {
            "driver": {
                "type": "nested",
                "properties": {
                    "last_name": {
                        "type": "text"
                    },
                    "vehicle": {
                        "type": "nested",
                        "properties": {
                            "make": {
                                "type": "text"
                            },
                            "model": {
                                "type": "text"
                            }
                        }
                    }
                }
            }
        }
    },
)
print(resp)
----
