1// docs/reindex.asciidoc:888
2
3[source, php]
4----
5$params = [
6    'body' => [
7        'source' => [
8            'remote' => [
9                'host' => 'http://otherhost:9200',
10                'username' => 'user',
11                'password' => 'pass',
12            ],
13            'index' => 'source',
14            'query' => [
15                'match' => [
16                    'test' => 'data',
17                ],
18            ],
19        ],
20        'dest' => [
21            'index' => 'dest',
22        ],
23    ],
24];
25$response = $client->reindex($params);
26----
27