Migration Get Assistanceedit

Index Upgrade Info Requestedit

An IndexUpgradeInfoRequest does not require any argument:

IndexUpgradeInfoRequest request = new IndexUpgradeInfoRequest(); 

Create a new request instance

Optional argumentsedit

The following arguments can optionally be provided:

request.indices("index1", "index2"); 

Set the indices to the request


Set the IndicesOptions to control how unavailable indices are resolved and how wildcard expressions are expanded


IndexUpgradeInfoResponse response = client.migration().getAssistance(request, RequestOptions.DEFAULT);


The returned IndexUpgradeInfoResponse contains the actions required for each index.

Map<String, UpgradeActionRequired> actions = response.getActions();
for (Map.Entry<String, UpgradeActionRequired> entry : actions.entrySet()) {
    String index = entry.getKey(); 
    UpgradeActionRequired actionRequired = entry.getValue(); 

Retrieve the index

Retrieve the action required for the migration of the current index