From 06c39e79d60cf9e89c3478b1b21079d0c9fee0f2 Mon Sep 17 00:00:00 2001 From: Martijn van Groningen Date: Thu, 27 Nov 2014 17:57:25 +0100 Subject: [PATCH] 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. --- .../search/child/SimpleChildQuerySearchTests.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/test/java/org/elasticsearch/search/child/SimpleChildQuerySearchTests.java b/src/test/java/org/elasticsearch/search/child/SimpleChildQuerySearchTests.java index f36e96fd8f3..7ba15528cd2 100644 --- a/src/test/java/org/elasticsearch/search/child/SimpleChildQuerySearchTests.java +++ b/src/test/java/org/elasticsearch/search/child/SimpleChildQuerySearchTests.java @@ -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