NOTE: You are looking at documentation for an older release. For the latest information, see the current release documentation.
Migration Upgradeedit
Index Upgrade Requestedit
An IndexUpgradeRequest
requires an index argument. Only one index at the time should be upgraded:
Executionedit
BulkByScrollResponse response = client.migration().upgrade(request, RequestOptions.DEFAULT);
Responseedit
The returned BulkByScrollResponse
contains information about the executed operation
Asynchronous Executionedit
The asynchronous execution of an upgrade request requires both the IndexUpgradeRequest
instance and an ActionListener
instance to be passed to the asynchronous
method:
ActionListener<BulkByScrollResponse> listener = new ActionListener<BulkByScrollResponse>() { @Override public void onResponse(BulkByScrollResponse bulkResponse) { } @Override public void onFailure(Exception e) { } };
Called when the execution is successfully completed. The response is provided as an argument and contains a list of individual results for each operation that was executed. Note that one or more operations might have failed while the others have been successfully executed. |
|
Called when the whole |
The asynchronous method does not block and returns immediately. Once it is
completed the ActionListener
is called back using the onResponse
method
if the execution successfully completed or using the onFailure
method if
it failed.