Skip to content

Commit

Permalink
Fix test failures
Browse files Browse the repository at this point in the history
Signed-off-by: cliu123 <lc12251109@gmail.com>
  • Loading branch information
cliu123 committed Apr 6, 2022
1 parent 640a62a commit d3ed308
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,7 @@ protected void populateData(Client tc) {
" }" +
"";

tc.admin().indices().create(new CreateIndexRequest("deals")
.settings(Settings.builder().put("number_of_shards", 1).put("number_of_replicas", 0).build())).actionGet();
tc.admin().indices().create(new CreateIndexRequest("deals").simpleMapping("amount", "type=integer").simpleMapping("owner", "type=text").simpleMapping("my_nested_object", "type=nested").settings(Settings.builder().put("number_of_shards", 1).put("number_of_replicas", 0).build())).actionGet();

//tc.index(new IndexRequest("deals").id("3").setRefreshPolicy(RefreshPolicy.IMMEDIATE)
// .source("{\"amount\": 7,\"owner\": \"a\", \"my_nested_object\" : {\"name\": \"spock\"}}", XContentType.JSON)).actionGet();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ public void testDlsWithMinDocCountZeroAggregations() throws Exception {
setup();

try (Client client = getClient()) {
client.admin().indices().create(new CreateIndexRequest("logs")).actionGet();
client.admin().indices().create(new CreateIndexRequest("logs").simpleMapping("termX", "type=keyword")).actionGet();

for (int i = 0; i < 3; i++) {
client.index(new IndexRequest("logs").setRefreshPolicy(RefreshPolicy.IMMEDIATE).source("amount", i, "termX", "A", "timestamp", "2022-01-06T09:05:00Z")).actionGet();
Expand Down

0 comments on commit d3ed308

Please sign in to comment.