diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/index/shard/service/InternalIndexShard.java b/modules/elasticsearch/src/main/java/org/elasticsearch/index/shard/service/InternalIndexShard.java index cd6b9b9821b..03375fea8ab 100644 --- a/modules/elasticsearch/src/main/java/org/elasticsearch/index/shard/service/InternalIndexShard.java +++ b/modules/elasticsearch/src/main/java/org/elasticsearch/index/shard/service/InternalIndexShard.java @@ -622,7 +622,7 @@ public class InternalIndexShard extends AbstractIndexShardComponent implements I @Override public void run() { try { // -1 means maybe merge - engine.optimize(new Engine.Optimize().maxNumSegments(-1).waitForMerge(false)); + engine.optimize(new Engine.Optimize().maxNumSegments(-1).waitForMerge(false).flush(false).refresh(false)); } catch (EngineClosedException e) { // we are being closed, ignore } catch (OptimizeFailedEngineException e) {