Skip to content

Commit 6191bf9

Browse files
committed
Optimize API: Change flush and refresh to default to true and not false, closes #187.
1 parent 10a245e commit 6191bf9

File tree

1 file changed

+6
-6
lines changed
  • modules/elasticsearch/src/main/java/org/elasticsearch/action/admin/indices/optimize

1 file changed

+6
-6
lines changed

modules/elasticsearch/src/main/java/org/elasticsearch/action/admin/indices/optimize/OptimizeRequest.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,9 @@ public class OptimizeRequest extends BroadcastOperationRequest {
4949

5050
private boolean onlyExpungeDeletes = false;
5151

52-
private boolean flush = false;
52+
private boolean flush = true;
5353

54-
private boolean refresh = false;
54+
private boolean refresh = true;
5555

5656
/**
5757
* Constructs an optimization request over one or more indices.
@@ -128,29 +128,29 @@ public OptimizeRequest onlyExpungeDeletes(boolean onlyExpungeDeletes) {
128128
}
129129

130130
/**
131-
* Should flush be performed after the optimization. Defaults to <tt>false</tt>.
131+
* Should flush be performed after the optimization. Defaults to <tt>true</tt>.
132132
*/
133133
public boolean flush() {
134134
return flush;
135135
}
136136

137137
/**
138-
* Should flush be performed after the optimization. Defaults to <tt>false</tt>.
138+
* Should flush be performed after the optimization. Defaults to <tt>true</tt>.
139139
*/
140140
public OptimizeRequest flush(boolean flush) {
141141
this.flush = flush;
142142
return this;
143143
}
144144

145145
/**
146-
* Should refresh be performed after the optimization. Defaults to <tt>false</tt>.
146+
* Should refresh be performed after the optimization. Defaults to <tt>true</tt>.
147147
*/
148148
public boolean refresh() {
149149
return refresh;
150150
}
151151

152152
/**
153-
* Should refresh be performed after the optimization. Defaults to <tt>false</tt>.
153+
* Should refresh be performed after the optimization. Defaults to <tt>true</tt>.
154154
*/
155155
public OptimizeRequest refresh(boolean refresh) {
156156
this.refresh = refresh;

0 commit comments

Comments
 (0)