public DefaultSearchContext(
      long id,
      ShardSearchRequest request,
      SearchShardTarget shardTarget,
      Engine.Searcher engineSearcher,
      IndexService indexService,
      IndexShard indexShard,
      ScriptService scriptService,
      CacheRecycler cacheRecycler,
      PageCacheRecycler pageCacheRecycler,
      BigArrays bigArrays) {
    this.id = id;
    this.request = request;
    this.searchType = request.searchType();
    this.shardTarget = shardTarget;
    this.engineSearcher = engineSearcher;
    this.scriptService = scriptService;
    this.cacheRecycler = cacheRecycler;
    this.pageCacheRecycler = pageCacheRecycler;
    this.bigArrays = bigArrays;
    this.dfsResult = new DfsSearchResult(id, shardTarget);
    this.queryResult = new QuerySearchResult(id, shardTarget);
    this.fetchResult = new FetchSearchResult(id, shardTarget);
    this.indexShard = indexShard;
    this.indexService = indexService;

    this.searcher = new ContextIndexSearcher(this, engineSearcher);

    // initialize the filtering alias based on the provided filters
    aliasFilter = indexService.aliasesService().aliasFilter(request.filteringAliases());
  }
  public DefaultSearchContext(
      long id,
      ShardSearchRequest request,
      SearchShardTarget shardTarget,
      Engine.Searcher engineSearcher,
      IndexService indexService,
      IndexShard indexShard,
      ScriptService scriptService,
      PageCacheRecycler pageCacheRecycler,
      BigArrays bigArrays,
      Counter timeEstimateCounter) {
    this.id = id;
    this.request = request;
    this.searchType = request.searchType();
    this.shardTarget = shardTarget;
    this.engineSearcher = engineSearcher;
    this.scriptService = scriptService;
    this.pageCacheRecycler = pageCacheRecycler;
    // SearchContexts use a BigArrays that can circuit break
    this.bigArrays = bigArrays.withCircuitBreaking();
    this.dfsResult = new DfsSearchResult(id, shardTarget);
    this.queryResult = new QuerySearchResult(id, shardTarget);
    this.fetchResult = new FetchSearchResult(id, shardTarget);
    this.indexShard = indexShard;
    this.indexService = indexService;

    this.searcher = new ContextIndexSearcher(this, engineSearcher);

    // initialize the filtering alias based on the provided filters
    aliasFilter = indexService.aliasesService().aliasFilter(request.filteringAliases());
    this.timeEstimateCounter = timeEstimateCounter;
  }
 public DefaultSearchContext(
     long id,
     ShardSearchRequest request,
     SearchShardTarget shardTarget,
     Engine.Searcher engineSearcher,
     IndexService indexService,
     IndexShard indexShard,
     ScriptService scriptService,
     PageCacheRecycler pageCacheRecycler,
     BigArrays bigArrays,
     Counter timeEstimateCounter,
     ParseFieldMatcher parseFieldMatcher,
     TimeValue timeout) {
   super(parseFieldMatcher, request);
   this.id = id;
   this.request = request;
   this.searchType = request.searchType();
   this.shardTarget = shardTarget;
   this.engineSearcher = engineSearcher;
   this.scriptService = scriptService;
   this.pageCacheRecycler = pageCacheRecycler;
   // SearchContexts use a BigArrays that can circuit break
   this.bigArrays = bigArrays.withCircuitBreaking();
   this.dfsResult = new DfsSearchResult(id, shardTarget);
   this.queryResult = new QuerySearchResult(id, shardTarget);
   this.fetchResult = new FetchSearchResult(id, shardTarget);
   this.indexShard = indexShard;
   this.indexService = indexService;
   this.searcher = new ContextIndexSearcher(this, engineSearcher);
   this.timeEstimateCounter = timeEstimateCounter;
   this.timeoutInMillis = timeout.millis();
 }