// This file is autogenerated, DO NOT EDIT
// indices/put-mapping.asciidoc:271

[source, python]
----
resp = client.indices.create(
    index="my-index-000001",
    mappings={
        "properties": {
            "user_id": {
                "type": "keyword",
                "ignore_above": 20
            }
        }
    },
)
print(resp)
----
