Test: predefine sort fields in mapping, otherwise during the test the field may not be found if it were to be introduced dynamically at index time.

This commit is contained in:
Martijn van Groningen 2014-11-27 17:57:25 +01:00
parent 6e4f3cf42d
commit 06c39e79d6
1 changed files with 2 additions and 2 deletions

View File

@ -1087,8 +1087,8 @@ public class SimpleChildQuerySearchTests extends ElasticsearchIntegrationTest {
.setSettings(settingsBuilder()
.put(indexSettings())
.put(IndexMetaData.SETTING_NUMBER_OF_SHARDS, between(2, DEFAULT_MAX_NUM_SHARDS)))
.addMapping("parent")
.addMapping("child", "_parent", "type=parent"));
.addMapping("parent", "p_field", "type=string")
.addMapping("child", "_parent", "type=parent", "c_field", "type=string"));
ensureGreen();
// index simple data