public class ResizeRequestBuilder extends AcknowledgedRequestBuilder<ResizeRequest,ResizeResponse,ResizeRequestBuilder>
action, client, request
Constructor | Description |
---|---|
ResizeRequestBuilder(ElasticsearchClient client,
Action<ResizeRequest,ResizeResponse,ResizeRequestBuilder> action) |
Modifier and Type | Method | Description |
---|---|---|
ResizeRequestBuilder |
setResizeType(ResizeType type) |
|
ResizeRequestBuilder |
setSettings(Settings settings) |
|
ResizeRequestBuilder |
setSourceIndex(java.lang.String index) |
|
ResizeRequestBuilder |
setTargetIndex(CreateIndexRequest request) |
|
ResizeRequestBuilder |
setWaitForActiveShards(int waitForActiveShards) |
A shortcut for
setWaitForActiveShards(ActiveShardCount) where the numerical
shard count is passed in, instead of having to first call ActiveShardCount.from(int)
to get the ActiveShardCount. |
ResizeRequestBuilder |
setWaitForActiveShards(ActiveShardCount waitForActiveShards) |
Sets the number of shard copies that should be active for creation of the
new shrunken index to return.
|
setTimeout, setTimeout
execute, execute, get, get, get, request
setMasterNodeTimeout, setMasterNodeTimeout
public ResizeRequestBuilder(ElasticsearchClient client, Action<ResizeRequest,ResizeResponse,ResizeRequestBuilder> action)
public ResizeRequestBuilder setTargetIndex(CreateIndexRequest request)
public ResizeRequestBuilder setSourceIndex(java.lang.String index)
public ResizeRequestBuilder setSettings(Settings settings)
public ResizeRequestBuilder setWaitForActiveShards(ActiveShardCount waitForActiveShards)
ActiveShardCount.DEFAULT
, which will
wait for one shard copy (the primary) to become active. Set this value to
ActiveShardCount.ALL
to 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.
Index creation 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 onpublic ResizeRequestBuilder setWaitForActiveShards(int waitForActiveShards)
setWaitForActiveShards(ActiveShardCount)
where the numerical
shard count is passed in, instead of having to first call ActiveShardCount.from(int)
to get the ActiveShardCount.public ResizeRequestBuilder setResizeType(ResizeType type)