Skip to content

Commit

Permalink
Adapt to ElasticSearch v0.90.4 + Bump to 1.3.0
Browse files Browse the repository at this point in the history
RefreshRequestBuilder.setWaitForOperations() seemed to have to impact,
and was removed. The setForce() function seems to have another use.

See #5.
  • Loading branch information
Olivier Favre committed Sep 24, 2013
1 parent 9d950a1 commit a9009f3
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 10 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ Version matrix:
┌───────────────────────────────┬────────────────────────┐
│ Update By Query Action Plugin │ ElasticSearch │
├───────────────────────────────┼────────────────────────┤
│ master │ 0.90.3 ─► master
│ master │ 0.90.4 ─►
├───────────────────────────────┼────────────────────────┤
│ 1.2.0 │ 0.90.3 ─► master
│ 1.2.0 │ 0.90.3
├───────────────────────────────┼────────────────────────┤
│ 1.1.0 │ 0.90.0.beta1 ─► 0.90.2 │
├───────────────────────────────┼────────────────────────┤
Expand Down
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

<groupId>com.yakaz.elasticsearch.plugins</groupId>
<artifactId>elasticsearch-action-updatebyquery</artifactId>
<version>1.2.1-SNAPSHOT</version>
<version>1.3.0-SNAPSHOT</version>
<packaging>jar</packaging>

<url>http://github.com/yakaz/elasticsearch-action-updatebyquery</url>
Expand Down Expand Up @@ -45,7 +45,7 @@
</parent>

<properties>
<elasticsearch.version>0.90.3</elasticsearch.version>
<elasticsearch.version>0.90.4</elasticsearch.version>
</properties>

<dependencies>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ private void doExecuteInternal(ShardUpdateByQueryRequest request, ActionListener
SearchContext searchContext = new SearchContext(
0,
shardSearchRequest,
null, indexShard.searcher(), indexService, indexShard,
null, indexShard.acquireSearcher(), indexService, indexShard,
scriptService,
cacheRecycler
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,9 @@
import java.io.IOException;
import java.util.Map;

import static org.elasticsearch.common.Strings.splitStringByCommaToArray;
import static org.elasticsearch.rest.RestRequest.Method.POST;
import static org.elasticsearch.rest.RestStatus.OK;
import static org.elasticsearch.rest.action.support.RestActions.splitIndices;
import static org.elasticsearch.rest.action.support.RestActions.splitTypes;

/**
* Rest handler for update by query requests.
Expand All @@ -62,8 +61,8 @@ public RestUpdateByQueryAction(Settings settings, Client client, RestController

public void handleRequest(final RestRequest request, final RestChannel channel) {
UpdateByQueryRequest udqRequest = new UpdateByQueryRequest(
splitIndices(request.param("index")),
splitTypes(request.param("type"))
splitStringByCommaToArray(request.param("index")),
splitStringByCommaToArray(request.param("type"))
);
udqRequest.listenerThreaded(false);
String replicationType = request.param("replication");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,7 @@ public void testUpdateByQuery_fields() throws Exception {
.setTTL(111211211)
.setSource("field1", 1, "content", "foo")
.execute().actionGet();
client.admin().indices().prepareRefresh("test").setWaitForOperations(true).execute().actionGet();
client.admin().indices().prepareRefresh("test").execute().actionGet();

CountResponse countResponse = client.prepareCount("test")
.setQuery(termQuery("field1", 1).buildAsBytes())
Expand Down

0 comments on commit a9009f3

Please sign in to comment.