mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-02-26 23:07:45 +00:00
make optimize default parameters constants
This commit is contained in:
parent
9ae9ab9553
commit
2e12e5b279
@ -43,15 +43,23 @@ import java.io.IOException;
|
||||
*/
|
||||
public class OptimizeRequest extends BroadcastOperationRequest {
|
||||
|
||||
private boolean waitForMerge = true;
|
||||
public static final class Defaults {
|
||||
public static final boolean WAIT_FOR_MERGE = true;
|
||||
public static final int MAX_NUM_SEGMENTS = -1;
|
||||
public static final boolean ONLY_EXPUNGE_DELETES = false;
|
||||
public static final boolean FLUSH = true;
|
||||
public static final boolean REFRESH = true;
|
||||
}
|
||||
|
||||
private int maxNumSegments = -1;
|
||||
private boolean waitForMerge = Defaults.WAIT_FOR_MERGE;
|
||||
|
||||
private boolean onlyExpungeDeletes = false;
|
||||
private int maxNumSegments = Defaults.MAX_NUM_SEGMENTS;
|
||||
|
||||
private boolean flush = true;
|
||||
private boolean onlyExpungeDeletes = Defaults.ONLY_EXPUNGE_DELETES;
|
||||
|
||||
private boolean refresh = true;
|
||||
private boolean flush = Defaults.FLUSH;
|
||||
|
||||
private boolean refresh = Defaults.FLUSH;
|
||||
|
||||
/**
|
||||
* Constructs an optimization request over one or more indices.
|
||||
|
@ -30,15 +30,15 @@ import java.io.IOException;
|
||||
*/
|
||||
class ShardOptimizeRequest extends BroadcastShardOperationRequest {
|
||||
|
||||
private boolean waitForMerge = true;
|
||||
private boolean waitForMerge = OptimizeRequest.Defaults.WAIT_FOR_MERGE;
|
||||
|
||||
private int maxNumSegments = -1;
|
||||
private int maxNumSegments = OptimizeRequest.Defaults.MAX_NUM_SEGMENTS;
|
||||
|
||||
private boolean onlyExpungeDeletes = false;
|
||||
private boolean onlyExpungeDeletes = OptimizeRequest.Defaults.ONLY_EXPUNGE_DELETES;
|
||||
|
||||
private boolean flush = false;
|
||||
private boolean flush = OptimizeRequest.Defaults.FLUSH;
|
||||
|
||||
private boolean refresh = false;
|
||||
private boolean refresh = OptimizeRequest.Defaults.REFRESH;
|
||||
|
||||
ShardOptimizeRequest() {
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user