- All Implemented Interfaces:
public class OpenIndexRequest extends AcknowledgedRequest<OpenIndexRequest> implements IndicesRequest.Replaceable
A request to open an index.
Nested Class Summary
Nested classes/interfaces inherited from class org.elasticsearch.transport.TransportRequest
Nested classes/interfaces inherited from interface org.elasticsearch.action.IndicesRequest
Fields inherited from class org.elasticsearch.action.support.master.AcknowledgedRequest
Method SummaryModifier and TypeMethodDescription
booleanDetermines whether the request should be applied to data streams.
indices()The indices to be openedSets the indices to be openedSpecifies what type of requested indices to ignore and how to deal with wildcard expressions.Specifies what type of requested indices to ignore and how to deal with wildcard expressions.
(int waitForActiveShards)Sets the number of shard copies that should be active for indices opening to return.
Methods inherited from class org.elasticsearch.action.support.master.AcknowledgedRequest
ackTimeout, timeout, timeout, timeout
Methods inherited from class org.elasticsearch.action.support.master.MasterNodeRequest
masterNodeTimeout, masterNodeTimeout, masterNodeTimeout
Methods inherited from class org.elasticsearch.transport.TransportRequest
getParentTask, setParentTask, toString
Methods inherited from class org.elasticsearch.transport.TransportMessage
decRef, hasReferences, incRef, remoteAddress, remoteAddress, tryIncRef
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.elasticsearch.action.IndicesRequest.Replaceable
DEFAULT_INDICES_OPTIONSpublic static final IndicesOptions DEFAULT_INDICES_OPTIONS
validatepublic ActionRequestValidationException validate()
indicespublic String indices()The indices to be opened
indicesSets the indices to be opened
indicesOptionspublic IndicesOptions indicesOptions()Specifies what type of requested indices to ignore and how to deal with wildcard expressions. For example indices that don't exist.
indicesOptionsSpecifies what type of requested indices to ignore and how to deal with wildcard expressions. For example indices that don't exist.
indicesOptions- the desired behaviour regarding indices to ignore and wildcard indices expressions
- the request itself
includeDataStreamspublic boolean includeDataStreams()Description copied from interface:
IndicesRequestDetermines whether the request should be applied to data streams. When
false, none of the names or wildcard expressions in
IndicesRequest.indices()should be applied to or expanded to any data streams. All layers involved in the request's fulfillment including security, name resolution, etc., should respect this flag.
waitForActiveShardspublic ActiveShardCount waitForActiveShards()
waitForActiveShardsSets the number of shard copies that should be active for indices opening to return. Defaults to
ActiveShardCount.DEFAULT, which will wait for one shard copy (the primary) to become active. Set this value to
ActiveShardCount.ALLto wait for all shards (primary and all replicas) to be active before returning. Otherwise, use
ActiveShardCount.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. Check
ShardsAcknowledgedResponse.isShardsAcknowledged()to determine if the requisite shard copies were all started before returning or timing out.
waitForActiveShards- number of active shard copies to wait on
waitForActiveShardspublic OpenIndexRequest waitForActiveShards
writeToDescription copied from interface: