// This file is autogenerated, DO NOT EDIT
// aggregations/metrics/string-stats-aggregation.asciidoc:178

[source, python]
----
resp = client.search(
    index="my-index-000001",
    size="0",
    aggs={
        "message_stats": {
            "string_stats": {
                "field": "message.keyword",
                "missing": "[empty message]"
            }
        }
    },
)
print(resp)
----
