So I kick off reindexing on the ElasticSearch server:
// Start reindexing on the server
var response = client.ReindexOnServer(new ReindexOnServerRequest()
{
Source = new ReindexSource() { Index = metadataModel.SourceIndexName },
Destination = new ReindexDestination() { Index = metadataModel.DestinationIndexName, OpType = Elasticsearch.Net.OpType.Create },
WaitForCompletion = false,
Refresh = true
});
var elasticSearchReIndexTaskId = response.Task.ToString();
and I got back the task ID. How can I use the Task API to track the progress of that task?
If the task is complete, would that error out or return something?
var response = client.TasksList(new TasksListRequest(elasticSearchTaskId));