Fix small typo in SearchService#executeQueryPhase

Relates #54044
This commit is contained in:
jimczi 2020-03-25 16:15:52 +01:00
parent 32fa90c9ba
commit 04fabead14
1 changed files with 4 additions and 3 deletions

View File

@ -377,11 +377,12 @@ public class SearchService extends AbstractLifecycleComponent implements IndexEv
// entirely. Otherwise we fork the execution in the search thread pool.
ShardSearchRequest canMatchRequest = new ShardSearchRequest(orig);
try (Engine.Searcher searcher = shard.acquireCanMatchSearcher()) {
QueryShardContext context = indexService.newQueryShardContext(request.shardId().id(), searcher,
request::nowInMillis, request.getClusterAlias());
Rewriteable.rewrite(request.getRewriteable(), context, true);
QueryShardContext context = indexService.newQueryShardContext(canMatchRequest.shardId().id(), searcher,
canMatchRequest::nowInMillis, canMatchRequest.getClusterAlias());
Rewriteable.rewrite(canMatchRequest.getRewriteable(), context, true);
} catch (Exception exc) {
listener.onFailure(exc);
return;
}
if (canRewriteToMatchNone(canMatchRequest.source())
&& canMatchRequest.source().query() instanceof MatchNoneQueryBuilder) {