diff --git a/core/src/main/java/org/elasticsearch/index/query/HasChildQueryParser.java b/core/src/main/java/org/elasticsearch/index/query/HasChildQueryParser.java index 04b032573d9..511d3a0ac4a 100644 --- a/core/src/main/java/org/elasticsearch/index/query/HasChildQueryParser.java +++ b/core/src/main/java/org/elasticsearch/index/query/HasChildQueryParser.java @@ -223,6 +223,7 @@ public class HasChildQueryParser implements QueryParser { @Override public Query rewrite(IndexReader reader) throws IOException { IndexSearcher indexSearcher = new IndexSearcher(reader); + indexSearcher.setQueryCache(null); String joinField = ParentFieldMapper.joinField(parentType); IndexParentChildFieldData indexParentChildFieldData = parentChildIndexFieldData.loadGlobal(indexSearcher.getIndexReader()); MultiDocValues.OrdinalMap ordinalMap = ParentChildIndexFieldData.getOrdinalMap(indexParentChildFieldData, parentType);