// docs/reindex.asciidoc:1002

[source, php]
----
$params = [
    'body' => [
        'source' => [
            'remote' => [
                'host' => 'http://otherhost:9200',
                'socket_timeout' => '1m',
                'connect_timeout' => '10s',
            ],
            'index' => 'source',
            'query' => [
                'match' => [
                    'test' => 'data',
                ],
            ],
        ],
        'dest' => [
            'index' => 'dest',
        ],
    ],
];
$response = $client->reindex($params);
----
