We are using ES 5.6 and trying to use Reindex API to copy documents from one Index to another. Both the Index are in the same cluster. When we are using the API for a type which had large number to documents we are facing a timeout error.
We have used a batch size of 5000.
POST _reindex
{
"source": {
"index": ["source-index-name"],
"type": ["type"],
"size": 5000
},
"dest": {
"index": "destination-index-name"
}
}
We are getting the following error:
{
"statusCode": 504,
"error": "Gateway Timeout",
"message": "Client request timeout"
}