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 13581b8ed75..f164f41d84e 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()) { - releaseIrrelevantSearchContexts(queryResults, docIdsToLoad); finishHim(); + releaseIrrelevantSearchContexts(queryResults, docIdsToLoad); } 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 adcc6f5b5b1..ded3b86406e 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()) { - releaseIrrelevantSearchContexts(queryResults, docIdsToLoad); finishHim(); + releaseIrrelevantSearchContexts(queryResults, docIdsToLoad); } final AtomicInteger counter = new AtomicInteger(docIdsToLoad.size());