public class OptimizeRequestBuilder extends BroadcastOperationRequestBuilder<OptimizeRequest,OptimizeResponse,OptimizeRequestBuilder,IndicesAdminClient>
setMaxNumSegments(int) allows to control the number of segments to optimize down to. By default, will
cause the optimize process to optimize down to half the configured number of segments.
client, request| Constructor and Description |
|---|
OptimizeRequestBuilder(IndicesAdminClient indicesClient) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
doExecute(ActionListener<OptimizeResponse> listener) |
OptimizeRequestBuilder |
setFlush(boolean flush)
Should flush be performed after the optimization.
|
OptimizeRequestBuilder |
setForce(boolean force)
Should the merge be forced even if there is a single segment with no deletions in the shard.
|
OptimizeRequestBuilder |
setMaxNumSegments(int maxNumSegments)
Will optimize the index down to <= maxNumSegments.
|
OptimizeRequestBuilder |
setOnlyExpungeDeletes(boolean onlyExpungeDeletes)
Should the optimization only expunge deletes from the index, without full optimization.
|
setIndices, setIndicesOptionsexecute, execute, get, get, get, putHeader, request, setListenerThreadedpublic OptimizeRequestBuilder(IndicesAdminClient indicesClient)
public OptimizeRequestBuilder setMaxNumSegments(int maxNumSegments)
public OptimizeRequestBuilder setOnlyExpungeDeletes(boolean onlyExpungeDeletes)
public OptimizeRequestBuilder setFlush(boolean flush)
public OptimizeRequestBuilder setForce(boolean force)
protected void doExecute(ActionListener<OptimizeResponse> listener)
doExecute in class ActionRequestBuilder<OptimizeRequest,OptimizeResponse,OptimizeRequestBuilder,IndicesAdminClient>Copyright © 2009–2016. All rights reserved.