From 6191bf9cdc81862026f42067c9e460b250389fc1 Mon Sep 17 00:00:00 2001 From: kimchy Date: Sat, 22 May 2010 02:38:38 +0300 Subject: [PATCH] Optimize API: Change flush and refresh to default to true and not false, closes #187. --- .../admin/indices/optimize/OptimizeRequest.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/action/admin/indices/optimize/OptimizeRequest.java b/modules/elasticsearch/src/main/java/org/elasticsearch/action/admin/indices/optimize/OptimizeRequest.java index db73df372c9..a1ffba7f35f 100644 --- a/modules/elasticsearch/src/main/java/org/elasticsearch/action/admin/indices/optimize/OptimizeRequest.java +++ b/modules/elasticsearch/src/main/java/org/elasticsearch/action/admin/indices/optimize/OptimizeRequest.java @@ -49,9 +49,9 @@ public class OptimizeRequest extends BroadcastOperationRequest { private boolean onlyExpungeDeletes = false; - private boolean flush = false; + private boolean flush = true; - private boolean refresh = false; + private boolean refresh = true; /** * Constructs an optimization request over one or more indices. @@ -128,14 +128,14 @@ public class OptimizeRequest extends BroadcastOperationRequest { } /** - * Should flush be performed after the optimization. Defaults to false. + * Should flush be performed after the optimization. Defaults to true. */ public boolean flush() { return flush; } /** - * Should flush be performed after the optimization. Defaults to false. + * Should flush be performed after the optimization. Defaults to true. */ public OptimizeRequest flush(boolean flush) { this.flush = flush; @@ -143,14 +143,14 @@ public class OptimizeRequest extends BroadcastOperationRequest { } /** - * Should refresh be performed after the optimization. Defaults to false. + * Should refresh be performed after the optimization. Defaults to true. */ public boolean refresh() { return refresh; } /** - * Should refresh be performed after the optimization. Defaults to false. + * Should refresh be performed after the optimization. Defaults to true. */ public OptimizeRequest refresh(boolean refresh) { this.refresh = refresh;