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.Empty
IndicesRequest.Replaceable
indices
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
upgrade() |
OptimizeRequest |
force(boolean force)
Deprecated.
Use
upgrade(boolean) . |
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() |
boolean |
upgrade()
Should the merge upgrade all old segments to the current index format.
|
OptimizeRequest |
upgrade(boolean upgrade)
See
upgrade() |
void |
writeTo(StreamOutput out) |
beforeLocalFork, beforeStart, indices, indices, indicesOptions, indicesOptions, validate
listenerThreaded, listenerThreaded
getHeader, getHeaders, hasHeader, putHeader, remoteAddress, remoteAddress
contextSize, copyContextFrom, getContext, getFromContext, getFromContext, hasInContext, isContextEmpty, putAllInContext, putInContext
public 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()
upgrade()
@Deprecated public OptimizeRequest force(boolean force)
upgrade(boolean)
.public boolean upgrade()
public OptimizeRequest upgrade(boolean upgrade)
upgrade()
public void readFrom(StreamInput in) throws IOException
readFrom
in interface Streamable
readFrom
in class BroadcastOperationRequest<OptimizeRequest>
IOException
public void writeTo(StreamOutput out) throws IOException
writeTo
in interface Streamable
writeTo
in class BroadcastOperationRequest<OptimizeRequest>
IOException
Copyright © 2009–2015. All rights reserved.