Class SearchShardIterator

java.lang.Object
org.elasticsearch.action.search.SearchShardIterator
All Implemented Interfaces:
Comparable<SearchShardIterator>, Countable

public final class SearchShardIterator extends Object implements Comparable<SearchShardIterator>, Countable
Extension of PlainShardIterator used in the search api, which also holds the OriginalIndices of the search request (useful especially with cross-cluster search, as each cluster has its own set of original indices) as well as the cluster alias.
See Also:
  • Constructor Details

    • SearchShardIterator

      public SearchShardIterator(@Nullable String clusterAlias, ShardId shardId, List<ShardRouting> shards, OriginalIndices originalIndices)
      Creates a PlainShardIterator instance that iterates over a subset of the given shards this the a given shardId.
      Parameters:
      clusterAlias - the alias of the cluster where the shard is located
      shardId - shard id of the group
      shards - shards to iterate
      originalIndices - the indices that the search request originally related to (before any rewriting happened)
    • SearchShardIterator

      public SearchShardIterator(@Nullable String clusterAlias, ShardId shardId, List<String> targetNodeIds, OriginalIndices originalIndices, ShardSearchContextId searchContextId, TimeValue searchContextKeepAlive)
  • Method Details