// This file is autogenerated, DO NOT EDIT
// mapping/types/sparse-vector.asciidoc:14

[source, python]
----
resp = client.indices.create(
    index="my-index",
    mappings={
        "properties": {
            "text.tokens": {
                "type": "sparse_vector"
            }
        }
    },
)
print(resp)
----
