public class OptimizeRequest extends BroadcastOperationRequest<OptimizeRequest>
maxNumSegments(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.
| Modifier and Type | Class and Description |
|---|---|
static class |
OptimizeRequest.Defaults |
TransportRequest.EmptyIndicesRequest.Replaceableindicesheaders| Constructor and Description |
|---|
OptimizeRequest() |
OptimizeRequest(String... indices)
Constructs an optimization request over one or more indices.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
flush()
Should flush be performed after the optimization.
|
OptimizeRequest |
flush(boolean flush)
Should flush be performed after the optimization.
|
boolean |
force()
Deprecated.
See
UpgradeRequest |
OptimizeRequest |
force(boolean force)
Deprecated.
|
int |
maxNumSegments()
Will optimize the index down to <= maxNumSegments.
|
OptimizeRequest |
maxNumSegments(int maxNumSegments)
Will optimize the index down to <= maxNumSegments.
|
boolean |
onlyExpungeDeletes()
Should the optimization only expunge deletes from the index, without full optimization.
|
OptimizeRequest |
onlyExpungeDeletes(boolean onlyExpungeDeletes)
Should the optimization only expunge deletes from the index, without full optimization.
|
void |
readFrom(StreamInput in) |
String |
toString() |
void |
writeTo(StreamOutput out) |
indices, indices, indicesOptions, indicesOptions, validatelistenerThreaded, listenerThreadedputHeader, remoteAddress, remoteAddresscontextSize, copyContextAndHeadersFrom, copyContextFrom, copyHeadersFrom, getContext, getFromContext, getFromContext, getHeader, getHeaders, hasHeader, hasInContext, isContextEmpty, putAllInContext, putInContextpublic OptimizeRequest(String... indices)
indices - The indices to optimize, no indices passed means all indices will be optimized.public OptimizeRequest()
public int maxNumSegments()
public OptimizeRequest maxNumSegments(int maxNumSegments)
public boolean onlyExpungeDeletes()
public OptimizeRequest onlyExpungeDeletes(boolean onlyExpungeDeletes)
public boolean flush()
public OptimizeRequest flush(boolean flush)
@Deprecated public boolean force()
UpgradeRequest@Deprecated public OptimizeRequest force(boolean force)
public void readFrom(StreamInput in) throws IOException
readFrom in interface StreamablereadFrom in class BroadcastOperationRequest<OptimizeRequest>IOExceptionpublic void writeTo(StreamOutput out) throws IOException
writeTo in interface StreamablewriteTo in class BroadcastOperationRequest<OptimizeRequest>IOExceptionCopyright © 2009–2016. All rights reserved.