From cb97b7939660b0f7de3e1f3c965326ec2b2551ee Mon Sep 17 00:00:00 2001 From: Martijn van Groningen Date: Wed, 18 Jun 2014 15:54:55 +0200 Subject: [PATCH] [TEST] Disable automatic refresh to prevent unintended field data warming of the the _parent field. --- .../search/child/SimpleChildQuerySearchTests.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/test/java/org/elasticsearch/search/child/SimpleChildQuerySearchTests.java b/src/test/java/org/elasticsearch/search/child/SimpleChildQuerySearchTests.java index 4652b99bb37..d5da1b4d518 100644 --- a/src/test/java/org/elasticsearch/search/child/SimpleChildQuerySearchTests.java +++ b/src/test/java/org/elasticsearch/search/child/SimpleChildQuerySearchTests.java @@ -32,6 +32,7 @@ import org.elasticsearch.action.search.SearchResponse; import org.elasticsearch.action.search.SearchType; import org.elasticsearch.cluster.metadata.IndexMetaData; import org.elasticsearch.common.lucene.search.function.CombineFunction; +import org.elasticsearch.common.settings.ImmutableSettings; import org.elasticsearch.common.unit.TimeValue; import org.elasticsearch.common.xcontent.XContentFactory; import org.elasticsearch.index.fielddata.FieldDataType; @@ -247,6 +248,8 @@ public class SimpleChildQuerySearchTests extends ElasticsearchIntegrationTest { public void testClearIdCacheBug() throws Exception { // enforce lazy loading to make sure that p/c stats are not counted as part of field data assertAcked(prepareCreate("test") + .setSettings(ImmutableSettings.builder().put(indexSettings()) + .put("index.refresh_interval", -1)) // Disable automatic refresh, so that the _parent doesn't get warmed .addMapping("parent", XContentFactory.jsonBuilder().startObject().startObject("parent") .startObject("properties") .startObject("p_field")