// This file is autogenerated, DO NOT EDIT
// analysis/tokenfilters/stemmer-override-tokenfilter.asciidoc:57

[source, python]
----
resp = client.indices.create(
    index="my-index-000001",
    settings={
        "analysis": {
            "analyzer": {
                "my_analyzer": {
                    "tokenizer": "standard",
                    "filter": [
                        "lowercase",
                        "custom_stems",
                        "porter_stem"
                    ]
                }
            },
            "filter": {
                "custom_stems": {
                    "type": "stemmer_override",
                    "rules": [
                        "running, runs => run",
                        "stemmer => stemmer"
                    ]
                }
            }
        }
    },
)
print(resp)
----
