added explicit creation of parent type in create index

This commit is contained in:
Luca Cavanna 2013-08-06 23:07:44 +02:00
parent 72d6d822ae
commit 3574d9de49
1 changed files with 8 additions and 1 deletions

View File

@ -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
public void testBulkUpdateDocAsUpsertWithParent() throws Exception {
client().admin().indices().prepareCreate("test")
.addMapping("parent", "{\"parent\":{}}")
.addMapping("child", "{\"child\": {\"_parent\": {\"type\": \"parent\"}}}")
.execute().actionGet();
client().admin().cluster().prepareHealth().setWaitForEvents(Priority.LANGUID).setWaitForGreenStatus().execute().actionGet();
@ -372,9 +375,13 @@ public class BulkTests extends AbstractSharedClusterTest {
assertSearchHits(searchResponse, "child1");
}
/*
Test for https://github.com/elasticsearch/elasticsearch/issues/3444
*/
@Test
public void testBulkUpdateUpsertWithParent() throws Exception {
client().admin().indices().prepareCreate("test")
.addMapping("parent", "{\"parent\":{}}")
.addMapping("child", "{\"child\": {\"_parent\": {\"type\": \"parent\"}}}")
.execute().actionGet();
client().admin().cluster().prepareHealth().setWaitForEvents(Priority.LANGUID).setWaitForGreenStatus().execute().actionGet();