// This file is autogenerated, DO NOT EDIT
// mapping/fields/doc-count-field.asciidoc:54

[source, python]
----
resp = client.index(
    index="my_index",
    id="1",
    document={
        "my_text": "histogram_1",
        "my_histogram": {
            "values": [
                0.1,
                0.2,
                0.3,
                0.4,
                0.5
            ],
            "counts": [
                3,
                7,
                23,
                12,
                6
            ]
        },
        "_doc_count": 45
    },
)
print(resp)

resp1 = client.index(
    index="my_index",
    id="2",
    document={
        "my_text": "histogram_2",
        "my_histogram": {
            "values": [
                0.1,
                0.25,
                0.35,
                0.4,
                0.45,
                0.5
            ],
            "counts": [
                8,
                17,
                8,
                7,
                6,
                2
            ]
        },
        "_doc_count": 62
    },
)
print(resp1)
----
