public void shard(SearchShardTarget target) { if (innerHits != null) { for (SearchHits innerHits : innerHits.values()) { for (SearchHit innerHit : innerHits) { innerHit.shard(target); } } } this.shard = target; if (target != null) { this.index = target.getIndex(); this.clusterAlias = target.getClusterAlias(); } }
/** * Returns the fully qualified index name, including the cluster alias. */ public String getFullyQualifiedIndexName() { return RemoteClusterAware.buildRemoteIndexName(getClusterAlias(), getIndex()); }
@Override public int compareTo(SearchShardTarget o) { int i = shardId.getIndexName().compareTo(o.getIndex()); if (i == 0) { i = shardId.getId() - o.shardId.id(); } return i; }
/** * The index the search failed on. */ @Override public String index() { if (shardTarget != null) { return shardTarget.getIndex(); } return null; }
public void shard(SearchShardTarget target) { this.shard = target; if (target != null) { this.index = target.getIndex(); } }
public void shard(SearchShardTarget target) { if (innerHits != null) { for (SearchHits innerHits : innerHits.values()) { for (SearchHit innerHit : innerHits) { innerHit.shard(target); } } } this.shard = target; if (target != null) { this.index = target.getIndex(); this.clusterAlias = target.getClusterAlias(); } }
/** * Returns the fully qualified index name, including the cluster alias. */ public String getFullyQualifiedIndexName() { return RemoteClusterAware.buildRemoteIndexName(getClusterAlias(), getIndex()); }
public void shard(SearchShardTarget target) { if (innerHits != null) { for (SearchHits innerHits : innerHits.values()) { for (SearchHit innerHit : innerHits) { innerHit.shard(target); } } } this.shard = target; if (target != null) { this.index = target.getIndex(); this.clusterAlias = target.getClusterAlias(); } }
/** * Returns the fully qualified index name, including the cluster alias. */ public String getFullyQualifiedIndexName() { return RemoteClusterAware.buildRemoteIndexName(getClusterAlias(), getIndex()); }
@Override public int compareTo(SearchShardTarget o) { int i = shardId.getIndexName().compareTo(o.getIndex()); if (i == 0) { i = shardId.getId() - o.shardId.id(); } return i; }
@Override public int compareTo(SearchShardTarget o) { int i = shardId.getIndexName().compareTo(o.getIndex()); if (i == 0) { i = shardId.getId() - o.shardId.id(); } return i; }
@Override public int compareTo(SearchShardTarget o) { int i = shardId.getIndexName().compareTo(o.getIndex()); if (i == 0) { i = shardId.getId() - o.shardId.id(); } return i; }
when(searchHit1.getShard()).thenReturn(searchShardTarget1); when(searchHit2.getShard()).thenReturn(searchShardTarget2); when(searchShardTarget1.getIndex()).thenReturn(TAG_SEARCH_INDEX_NAME); when(searchShardTarget2.getIndex()).thenReturn(BUSINESS_OBJECT_DEFINITION_SEARCH_INDEX_NAME); when(searchHits.getTotalHits()).thenReturn(200L);