Package org.elasticsearch.action.search
Class SearchShardIterator
- java.lang.Object
-
- org.elasticsearch.cluster.routing.PlainShardsIterator
-
- org.elasticsearch.cluster.routing.PlainShardIterator
-
- org.elasticsearch.action.search.SearchShardIterator
-
- All Implemented Interfaces:
java.lang.Comparable<ShardIterator>
,java.lang.Iterable<ShardRouting>
,ShardIterator
,ShardsIterator
public final class SearchShardIterator extends PlainShardIterator
Extension ofPlainShardIterator
used in the search api, which also holds theOriginalIndices
of the search request. Useful especially with cross cluster search, as each cluster has its own set of original indices.
-
-
Constructor Summary
Constructors Constructor Description SearchShardIterator(java.lang.String clusterAlias, ShardId shardId, java.util.List<ShardRouting> shards, OriginalIndices originalIndices)
Creates aPlainShardIterator
instance that iterates over a subset of the given shards this the a givenshardId
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getClusterAlias()
OriginalIndices
getOriginalIndices()
Returns the original indices associated with this shard iterator, specifically with the cluster that this shard belongs to.-
Methods inherited from class org.elasticsearch.cluster.routing.PlainShardIterator
compareTo, equals, hashCode, shardId
-
Methods inherited from class org.elasticsearch.cluster.routing.PlainShardsIterator
getShardRoutings, iterator, nextOrNull, remaining, reset, size, sizeActive
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.elasticsearch.cluster.routing.ShardIterator
reset
-
Methods inherited from interface org.elasticsearch.cluster.routing.ShardsIterator
getShardRoutings, nextOrNull, remaining, size, sizeActive
-
-
-
-
Constructor Detail
-
SearchShardIterator
public SearchShardIterator(java.lang.String clusterAlias, ShardId shardId, java.util.List<ShardRouting> shards, OriginalIndices originalIndices)
Creates aPlainShardIterator
instance that iterates over a subset of the given shards this the a givenshardId
.- Parameters:
shardId
- shard id of the groupshards
- shards to iterate
-
-
Method Detail
-
getOriginalIndices
public OriginalIndices getOriginalIndices()
Returns the original indices associated with this shard iterator, specifically with the cluster that this shard belongs to.
-
getClusterAlias
public java.lang.String getClusterAlias()
-
-