added explicit creation of parent type in create index
This commit is contained in:
parent
72d6d822ae
commit
3574d9de49
|
@ -337,10 +337,13 @@ public class BulkTests extends AbstractSharedClusterTest {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//Test for https://github.com/elasticsearch/elasticsearch/issues/3444
|
/*
|
||||||
|
Test for https://github.com/elasticsearch/elasticsearch/issues/3444
|
||||||
|
*/
|
||||||
@Test
|
@Test
|
||||||
public void testBulkUpdateDocAsUpsertWithParent() throws Exception {
|
public void testBulkUpdateDocAsUpsertWithParent() throws Exception {
|
||||||
client().admin().indices().prepareCreate("test")
|
client().admin().indices().prepareCreate("test")
|
||||||
|
.addMapping("parent", "{\"parent\":{}}")
|
||||||
.addMapping("child", "{\"child\": {\"_parent\": {\"type\": \"parent\"}}}")
|
.addMapping("child", "{\"child\": {\"_parent\": {\"type\": \"parent\"}}}")
|
||||||
.execute().actionGet();
|
.execute().actionGet();
|
||||||
client().admin().cluster().prepareHealth().setWaitForEvents(Priority.LANGUID).setWaitForGreenStatus().execute().actionGet();
|
client().admin().cluster().prepareHealth().setWaitForEvents(Priority.LANGUID).setWaitForGreenStatus().execute().actionGet();
|
||||||
|
@ -372,9 +375,13 @@ public class BulkTests extends AbstractSharedClusterTest {
|
||||||
assertSearchHits(searchResponse, "child1");
|
assertSearchHits(searchResponse, "child1");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
Test for https://github.com/elasticsearch/elasticsearch/issues/3444
|
||||||
|
*/
|
||||||
@Test
|
@Test
|
||||||
public void testBulkUpdateUpsertWithParent() throws Exception {
|
public void testBulkUpdateUpsertWithParent() throws Exception {
|
||||||
client().admin().indices().prepareCreate("test")
|
client().admin().indices().prepareCreate("test")
|
||||||
|
.addMapping("parent", "{\"parent\":{}}")
|
||||||
.addMapping("child", "{\"child\": {\"_parent\": {\"type\": \"parent\"}}}")
|
.addMapping("child", "{\"child\": {\"_parent\": {\"type\": \"parent\"}}}")
|
||||||
.execute().actionGet();
|
.execute().actionGet();
|
||||||
client().admin().cluster().prepareHealth().setWaitForEvents(Priority.LANGUID).setWaitForGreenStatus().execute().actionGet();
|
client().admin().cluster().prepareHealth().setWaitForEvents(Priority.LANGUID).setWaitForGreenStatus().execute().actionGet();
|
||||||
|
|
Loading…
Reference in New Issue