diff --git a/pom.xml b/pom.xml
index 25d4b32..be828aa 100644
--- a/pom.xml
+++ b/pom.xml
@@ -31,7 +31,7 @@
- 0.90.3
+ 1.1.1
diff --git a/src/test/java/org/elasticsearch/search/facet/script/SimpleScriptFacetTests.java b/src/test/java/org/elasticsearch/search/facet/script/SimpleScriptFacetTests.java
index ab8b2bf..8cb62e4 100644
--- a/src/test/java/org/elasticsearch/search/facet/script/SimpleScriptFacetTests.java
+++ b/src/test/java/org/elasticsearch/search/facet/script/SimpleScriptFacetTests.java
@@ -84,7 +84,7 @@ public void testBinaryFacet() throws Exception {
.endObject()).execute().actionGet();
}
- client().admin().indices().prepareFlush().setRefresh(true).execute().actionGet();
+ client().admin().indices().prepareFlush().execute().actionGet();
for (int i = 0; i < 5; i++) {
client().prepareIndex("test", "type1").setSource(jsonBuilder().startObject()
@@ -171,7 +171,7 @@ public void testUpdateFacet() throws Exception {
.endObject()).execute().actionGet();
}
- client().admin().indices().prepareFlush().setRefresh(true).execute().actionGet();
+ client().admin().indices().prepareFlush().execute().actionGet();
for (int i = 0; i < 5; i++) {
client().prepareIndex("test1", "type1").setSource(jsonBuilder().startObject()
@@ -186,7 +186,6 @@ public void testUpdateFacet() throws Exception {
}
client().admin().indices().prepareRefresh().execute().actionGet();
-
SearchResponse searchResponse = client().prepareSearch()
.setSearchType(SearchType.COUNT)
.setIndices("test1", "test2")
@@ -197,8 +196,9 @@ public void testUpdateFacet() throws Exception {
.field("init_script", "index = _ctx.request().index();")
.field("map_script", "" +
"uid = doc._uid.value;" +
- "id = org.elasticsearch.index.mapper.Uid.idFromUid(uid);" +
- "type = org.elasticsearch.index.mapper.Uid.typeFromUid(uid);" +
+ "uidId = org.elasticsearch.index.mapper.Uid.createUid(uid);" +
+ "id = uidId.id();" +
+ "type = uidId.type();" +
"if (!_source.isEmpty()) {" +
" modified = true;" +
" map = _source.source();" +
@@ -271,7 +271,7 @@ public void testCharFrequencies() throws Exception {
.field("message", "IJKLMNOP")
.endObject()).execute().actionGet();
- client().admin().indices().prepareFlush().setRefresh(true).execute().actionGet();
+ client().admin().indices().prepareFlush().execute().actionGet();
client().admin().indices().prepareRefresh().execute().actionGet();
@@ -328,7 +328,7 @@ public void testClientAccessFromScript() throws Exception {
.field("message", "foo bar")
.endObject()).execute().actionGet();
- client().admin().indices().prepareFlush().setRefresh(true).execute().actionGet();
+ client().admin().indices().prepareFlush().execute().actionGet();
client().admin().indices().prepareRefresh().execute().actionGet();
@@ -339,7 +339,7 @@ public void testClientAccessFromScript() throws Exception {
.startObject("facets")
.startObject("facet1")
.startObject("script")
- .field("map_script", "_client.prepareUpdate(\"test1\", \"type1\", org.elasticsearch.index.mapper.Uid.idFromUid(doc['_uid'].value)).setDoc(\"{\\\"message\\\": \\\"baz\\\"}\").execute().actionGet()")
+ .field("map_script", "_client.prepareUpdate(\"test1\", \"type1\", org.elasticsearch.index.mapper.Uid.createUid(doc['_uid'].value).id()).setDoc(\"{\\\"message\\\": \\\"baz\\\"}\").execute().actionGet()")
.endObject()
.endObject()
.endObject()
@@ -378,7 +378,7 @@ public void testScriptParams() throws Exception {
.field("num", i)
.endObject()).execute().actionGet();
}
- client().admin().indices().prepareFlush().setRefresh(true).execute().actionGet();
+ client().admin().indices().prepareFlush().execute().actionGet();
client().admin().indices().prepareRefresh().execute().actionGet();