// This file is autogenerated, DO NOT EDIT
// mapping/types/rank-vectors.asciidoc:64

[source, python]
----
resp = client.indices.create(
    index="my-rank-vectors-bit",
    mappings={
        "properties": {
            "my_vector": {
                "type": "rank_vectors",
                "element_type": "bit"
            }
        }
    },
)
print(resp)

resp1 = client.bulk(
    index="my-rank-vectors-bit",
    refresh=True,
    operations=[
        {
            "index": {
                "_id": "1"
            }
        },
        {
            "my_vector": [
                127,
                -127,
                0,
                1,
                42
            ]
        },
        {
            "index": {
                "_id": "2"
            }
        },
        {
            "my_vector": "8100012a7f"
        }
    ],
)
print(resp1)
----
