Class RecoveryRequest
All recoveries, whether ongoing or complete, are kept in the cluster state and may be reported on at any time.
Shard recovery is the process of initializing a shard copy, such as restoring a primary shard from a snapshot or creating a replica shard from a primary shard. When a shard recovery completes, the recovered shard is available for search and indexing.
Recovery automatically occurs during the following processes:
- When creating an index for the first time.
- When a node rejoins the cluster and starts up any missing primary shard copies using the data that it holds in its data path.
- Creation of new replica shard copies from the primary.
- Relocation of a shard copy to a different node in the same cluster.
- A snapshot restore operation.
- A clone, shrink, or split operation.
You can determine the cause of a shard recovery using the recovery or cat recovery APIs.
The index recovery API reports information about completed recoveries only for shard copies that currently exist in the cluster. It only reports the last recovery for each shard copy and does not report historical information about earlier recoveries, nor does it report information about the recoveries of shard copies that no longer exist. This means that if a shard copy completes a recovery and then Elasticsearch relocates it onto a different node then the information about the original recovery will not be shown in the recovery API.
- See Also:
- 
Nested Class SummaryNested ClassesNested classes/interfaces inherited from class co.elastic.clients.elasticsearch._types.RequestBaseRequestBase.AbstractBuilder<BuilderT extends RequestBase.AbstractBuilder<BuilderT>>
- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic final Endpoint<RecoveryRequest,RecoveryResponse, ErrorResponse> Endpoint "indices.recovery".
- 
Method SummaryModifier and TypeMethodDescriptionfinal BooleanIftrue, the response only includes ongoing shard recoveries.final BooleanIffalse, the request returns an error if any wildcard expression, index alias, or_allvalue targets only missing or closed indices.final Booleandetailed()Iftrue, the response includes detailed information about shard recoveries.final List<ExpandWildcard>Type of index that wildcard patterns can match.final BooleanIffalse, the request returns an error if it targets a missing or closed index.index()Comma-separated list of data streams, indices, and aliases used to limit the request.static RecoveryRequestMethods inherited from class co.elastic.clients.elasticsearch._types.RequestBasetoString
- 
Field Details- 
_ENDPOINTEndpoint "indices.recovery".
 
- 
- 
Method Details- 
ofpublic static RecoveryRequest of(Function<RecoveryRequest.Builder, ObjectBuilder<RecoveryRequest>> fn) 
- 
activeOnlyIftrue, the response only includes ongoing shard recoveries.API name: active_only
- 
allowNoIndicesIffalse, the request returns an error if any wildcard expression, index alias, or_allvalue targets only missing or closed indices. This behavior applies even if the request targets other open indices.API name: allow_no_indices
- 
detailedIftrue, the response includes detailed information about shard recoveries.API name: detailed
- 
expandWildcardsType of index that wildcard patterns can match. If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams. Supports comma-separated values, such asopen,hidden.API name: expand_wildcards
- 
indexComma-separated list of data streams, indices, and aliases used to limit the request. Supports wildcards (*). To target all data streams and indices, omit this parameter or use*or_all.API name: index
 
-