Skip to content

Commit

Permalink
Upgrade to Elasticsearch 1.5.1
Browse files Browse the repository at this point in the history
Due to the removal of `wait_for_merge` from the ES Optimize API the behaviour
of `Indices#optimizeIndex(String)` changed from blocking to non-blocking.

See elastic/elasticsearch#8921 for details
  • Loading branch information
Jochen Schalanda committed Apr 9, 2015
1 parent d2f6fc9 commit d1fa7b3
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
Expand Up @@ -275,7 +275,6 @@ public void setReadOnly(String index) {
public void flush(String index) {
FlushRequest flush = new FlushRequest(index);
flush.force(true); // Just flushes. Even if it is not necessary.
flush.full(false);

c.admin().indices().flush(new FlushRequest(index).force(true)).actionGet();
}
Expand Down Expand Up @@ -398,7 +397,6 @@ public void optimizeIndex(String index) {
or.maxNumSegments(configuration.getIndexOptimizationMaxNumSegments());
or.onlyExpungeDeletes(false);
or.flush(true);
or.waitForMerge(true); // This makes us block until the operation finished.

c.admin().indices().optimize(or).actionGet();
}
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Expand Up @@ -221,7 +221,7 @@
<dependency>
<groupId>org.elasticsearch</groupId>
<artifactId>elasticsearch</artifactId>
<version>1.4.4</version>
<version>1.5.1</version>
</dependency>

<dependency>
Expand Down

0 comments on commit d1fa7b3

Please sign in to comment.