// docs/reindex.asciidoc:204

[source, php]
----
$params = [
    'body' => [
        'source' => [
            'index' => 'twitter',
            'slice' => [
                'id' => 0,
                'max' => 2,
            ],
        ],
        'dest' => [
            'index' => 'new_twitter',
        ],
    ],
];
$response = $client->reindex($params);
$params = [
    'body' => [
        'source' => [
            'index' => 'twitter',
            'slice' => [
                'id' => 1,
                'max' => 2,
            ],
        ],
        'dest' => [
            'index' => 'new_twitter',
        ],
    ],
];
$response = $client->reindex($params);
----
