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. // entirely. Otherwise we fork the execution in the search thread pool.
ShardSearchRequest canMatchRequest = new ShardSearchRequest(orig); ShardSearchRequest canMatchRequest = new ShardSearchRequest(orig);
try (Engine.Searcher searcher = shard.acquireCanMatchSearcher()) { try (Engine.Searcher searcher = shard.acquireCanMatchSearcher()) {
QueryShardContext context = indexService.newQueryShardContext(request.shardId().id(), searcher, QueryShardContext context = indexService.newQueryShardContext(canMatchRequest.shardId().id(), searcher,
request::nowInMillis, request.getClusterAlias()); canMatchRequest::nowInMillis, canMatchRequest.getClusterAlias());
Rewriteable.rewrite(request.getRewriteable(), context, true); Rewriteable.rewrite(canMatchRequest.getRewriteable(), context, true);
} catch (Exception exc) { } catch (Exception exc) {
listener.onFailure(exc); listener.onFailure(exc);
return;
} }
if (canRewriteToMatchNone(canMatchRequest.source()) if (canRewriteToMatchNone(canMatchRequest.source())
&& canMatchRequest.source().query() instanceof MatchNoneQueryBuilder) { && canMatchRequest.source().query() instanceof MatchNoneQueryBuilder) {