Class OpenIndexRequestBuilder
java.lang.Object
org.opensearch.action.ActionRequestBuilder<OpenIndexRequest,OpenIndexResponse>
org.opensearch.action.support.clustermanager.ClusterManagerNodeOperationRequestBuilder<OpenIndexRequest,OpenIndexResponse,OpenIndexRequestBuilder>
org.opensearch.action.support.master.MasterNodeOperationRequestBuilder<OpenIndexRequest,OpenIndexResponse,OpenIndexRequestBuilder>
org.opensearch.action.support.master.AcknowledgedRequestBuilder<OpenIndexRequest,OpenIndexResponse,OpenIndexRequestBuilder>
org.opensearch.action.admin.indices.open.OpenIndexRequestBuilder
@PublicApi(since="1.0.0")
public class OpenIndexRequestBuilder
extends AcknowledgedRequestBuilder<OpenIndexRequest,OpenIndexResponse,OpenIndexRequestBuilder>
Builder for for open index request
- Opensearch.api:
-
Field Summary
Fields inherited from class org.opensearch.action.ActionRequestBuilder
action, client, request
-
Constructor Summary
ConstructorDescriptionOpenIndexRequestBuilder
(OpenSearchClient client, OpenIndexAction action) OpenIndexRequestBuilder
(OpenSearchClient client, OpenIndexAction action, String... indices) -
Method Summary
Modifier and TypeMethodDescriptionsetIndices
(String... indices) Sets the indices to be openedsetIndicesOptions
(IndicesOptions indicesOptions) Specifies what type of requested indices to ignore and how to deal with wildcard indices expressions.setWaitForActiveShards
(int waitForActiveShards) A shortcut forsetWaitForActiveShards(ActiveShardCount)
where the numerical shard count is passed in, instead of having to first callActiveShardCount.from(int)
to get the ActiveShardCount.setWaitForActiveShards
(ActiveShardCount waitForActiveShards) Sets the number of shard copies that should be active for indices opening to return.Methods inherited from class org.opensearch.action.support.master.AcknowledgedRequestBuilder
setTimeout, setTimeout
Methods inherited from class org.opensearch.action.support.clustermanager.ClusterManagerNodeOperationRequestBuilder
setClusterManagerNodeTimeout, setClusterManagerNodeTimeout, setMasterNodeTimeout, setMasterNodeTimeout
-
Constructor Details
-
OpenIndexRequestBuilder
-
OpenIndexRequestBuilder
-
-
Method Details
-
setIndices
Sets the indices to be opened- Parameters:
indices
- the indices to be opened- Returns:
- the request itself
-
setIndicesOptions
Specifies what type of requested indices to ignore and how to deal with wildcard indices expressions. For example indices that don't exist.- Parameters:
indicesOptions
- the desired behaviour regarding indices to ignore and wildcard indices expressions- Returns:
- the request itself
-
setWaitForActiveShards
Sets the number of shard copies that should be active for indices opening to return. Defaults toActiveShardCount.DEFAULT
, which will wait for one shard copy (the primary) to become active. Set this value toActiveShardCount.ALL
to wait for all shards (primary and all replicas) to be active before returning. Otherwise, useActiveShardCount.from(int)
to set this value to any non-negative integer, up to the number of copies per shard (number of replicas + 1), to wait for the desired amount of shard copies to become active before returning. Indices opening will only wait up until the timeout value for the number of shard copies to be active before returning. CheckShardsAcknowledgedResponse.isShardsAcknowledged()
to determine if the requisite shard copies were all started before returning or timing out.- Parameters:
waitForActiveShards
- number of active shard copies to wait on
-
setWaitForActiveShards
A shortcut forsetWaitForActiveShards(ActiveShardCount)
where the numerical shard count is passed in, instead of having to first callActiveShardCount.from(int)
to get the ActiveShardCount.
-