|
26 | 26 | import org.elasticsearch.action.admin.indices.stats.IndicesStatsResponse;
|
27 | 27 | import org.elasticsearch.action.delete.DeleteResponse;
|
28 | 28 | import org.elasticsearch.action.get.GetResponse;
|
| 29 | +import org.elasticsearch.action.index.IndexResponse; |
29 | 30 | import org.elasticsearch.action.search.SearchRequestBuilder;
|
30 | 31 | import org.elasticsearch.action.search.SearchResponse;
|
31 | 32 | import org.elasticsearch.action.search.SearchType;
|
@@ -1208,7 +1209,7 @@ public void testNestedSortingWithNestedFilterAsFilter() throws Exception {
|
1208 | 1209 | .endObject()
|
1209 | 1210 | .endObject().endObject()));
|
1210 | 1211 |
|
1211 |
| - client().prepareIndex("test", "type", "1").setSource(jsonBuilder().startObject() |
| 1212 | + IndexResponse indexResponse1 = client().prepareIndex("test", "type", "1").setSource(jsonBuilder().startObject() |
1212 | 1213 | .field("officelocation", "gendale")
|
1213 | 1214 | .startArray("users")
|
1214 | 1215 | .startObject()
|
@@ -1255,8 +1256,9 @@ public void testNestedSortingWithNestedFilterAsFilter() throws Exception {
|
1255 | 1256 | .endObject()
|
1256 | 1257 | .endArray()
|
1257 | 1258 | .endObject()).get();
|
| 1259 | + assertTrue(indexResponse1.getShardInfo().getSuccessful() > 0); |
1258 | 1260 |
|
1259 |
| - client().prepareIndex("test", "type", "2").setSource(jsonBuilder().startObject() |
| 1261 | + IndexResponse indexResponse2 = client().prepareIndex("test", "type", "2").setSource(jsonBuilder().startObject() |
1260 | 1262 | .field("officelocation", "gendale")
|
1261 | 1263 | .startArray("users")
|
1262 | 1264 | .startObject()
|
@@ -1303,6 +1305,7 @@ public void testNestedSortingWithNestedFilterAsFilter() throws Exception {
|
1303 | 1305 | .endObject()
|
1304 | 1306 | .endArray()
|
1305 | 1307 | .endObject()).get();
|
| 1308 | + assertTrue(indexResponse2.getShardInfo().getSuccessful() > 0); |
1306 | 1309 | refresh();
|
1307 | 1310 |
|
1308 | 1311 | SearchResponse searchResponse = client().prepareSearch("test")
|
|
0 commit comments