// docs/reindex.asciidoc:888

[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);
----
