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 Summary
Nested ClassesNested classes/interfaces inherited from class co.elastic.clients.elasticsearch._types.RequestBase
RequestBase.AbstractBuilder<BuilderT extends RequestBase.AbstractBuilder<BuilderT>>
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Endpoint<RecoveryRequest,
RecoveryResponse, ErrorResponse> Endpoint "indices.recovery
". -
Method Summary
Modifier and TypeMethodDescriptionfinal Boolean
Iftrue
, the response only includes ongoing shard recoveries.final Boolean
detailed()
Iftrue
, the response includes detailed information about shard recoveries.index()
Comma-separated list of data streams, indices, and aliases used to limit the request.static RecoveryRequest
Methods inherited from class co.elastic.clients.elasticsearch._types.RequestBase
toString
-
Field Details
-
_ENDPOINT
Endpoint "indices.recovery
".
-
-
Method Details
-
of
public static RecoveryRequest of(Function<RecoveryRequest.Builder, ObjectBuilder<RecoveryRequest>> fn) -
activeOnly
Iftrue
, the response only includes ongoing shard recoveries.API name:
active_only
-
detailed
Iftrue
, the response includes detailed information about shard recoveries.API name:
detailed
-
index
Comma-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
-