// This file is autogenerated, DO NOT EDIT
// search/search-your-data/highlighting.asciidoc:699

[source, python]
----
resp = client.indices.create(
    index="example",
    mappings={
        "properties": {
            "comment": {
                "type": "text",
                "term_vector": "with_positions_offsets"
            }
        }
    },
)
print(resp)
----
