Avoid processing search profile results twice. (#51575)

Just a small clean-up, not motivated by performance.
This commit is contained in:
Julie Tibshirani 2020-01-29 14:36:33 -08:00
parent 0d21d9e2c5
commit 40f4f2d267
1 changed files with 0 additions and 4 deletions

View File

@ -307,10 +307,6 @@ public class QueryPhase implements SearchPhase {
queryResult.nodeQueueSize(rExecutor.getCurrentQueueSize());
queryResult.serviceTimeEWMA((long) rExecutor.getTaskExecutionEWMA());
}
if (searchContext.getProfilers() != null) {
ProfileShardResult shardResults = SearchProfileShardResults.buildShardResults(searchContext.getProfilers());
queryResult.profileResults(shardResults);
}
return shouldRescore;
} catch (Exception e) {
throw new QueryPhaseExecutionException(searchContext.shardTarget(), "Failed to execute main query", e);