diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/action/search/type/TransportSearchDfsQueryThenFetchAction.java b/modules/elasticsearch/src/main/java/org/elasticsearch/action/search/type/TransportSearchDfsQueryThenFetchAction.java index f164f41d84e..13581b8ed75 100644 --- a/modules/elasticsearch/src/main/java/org/elasticsearch/action/search/type/TransportSearchDfsQueryThenFetchAction.java +++ b/modules/elasticsearch/src/main/java/org/elasticsearch/action/search/type/TransportSearchDfsQueryThenFetchAction.java @@ -171,8 +171,8 @@ public class TransportSearchDfsQueryThenFetchAction extends TransportSearchTypeA final Map docIdsToLoad = searchPhaseController.docIdsToLoad(sortedShardList); if (docIdsToLoad.isEmpty()) { - finishHim(); releaseIrrelevantSearchContexts(queryResults, docIdsToLoad); + finishHim(); } final AtomicInteger counter = new AtomicInteger(docIdsToLoad.size()); diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/action/search/type/TransportSearchQueryThenFetchAction.java b/modules/elasticsearch/src/main/java/org/elasticsearch/action/search/type/TransportSearchQueryThenFetchAction.java index ded3b86406e..adcc6f5b5b1 100644 --- a/modules/elasticsearch/src/main/java/org/elasticsearch/action/search/type/TransportSearchQueryThenFetchAction.java +++ b/modules/elasticsearch/src/main/java/org/elasticsearch/action/search/type/TransportSearchQueryThenFetchAction.java @@ -85,8 +85,8 @@ public class TransportSearchQueryThenFetchAction extends TransportSearchTypeActi final Map docIdsToLoad = searchPhaseController.docIdsToLoad(sortedShardList); if (docIdsToLoad.isEmpty()) { - finishHim(); releaseIrrelevantSearchContexts(queryResults, docIdsToLoad); + finishHim(); } final AtomicInteger counter = new AtomicInteger(docIdsToLoad.size());