// docs/reindex.asciidoc:905

[source, php]
----
$params = [
    'body' => [
        'source' => [
            'remote' => [
                'host' => 'http://otherhost:9200',
                'username' => 'user',
                'password' => 'pass',
            ],
            'index' => 'source',
            'query' => [
                'match' => [
                    'test' => 'data',
                ],
            ],
        ],
        'dest' => [
            'index' => 'dest',
        ],
    ],
];
$response = $client->reindex($params);
----
