// This file is autogenerated, DO NOT EDIT
// docs/reindex.asciidoc:1009

[source, python]
----
resp = client.reindex(
    source={
        "remote": {
            "host": "http://otherhost:9200",
            "headers": {
                "Authorization": "ApiKey API_KEY_VALUE"
            }
        },
        "index": "my-index-000001",
        "query": {
            "match": {
                "test": "data"
            }
        }
    },
    dest={
        "index": "my-new-index-000001"
    },
)
print(resp)
----
