Use ShardId#getIndexName() since index name has been removed from ShardSearchRequest

Original commit: elastic/x-pack-elasticsearch@ba997d0ae3
This commit is contained in:
Simon Willnauer 2016-03-09 19:54:27 +01:00
parent 878e12f318
commit a033f95072
1 changed files with 1 additions and 1 deletions

View File

@ -55,7 +55,7 @@ public final class OptOutQueryCache extends AbstractIndexComponent implements Qu
// At this level only IndicesRequest
final String indexName;
if (context.getRequest() instanceof ShardSearchRequest) {
indexName = ((ShardSearchRequest) context.getRequest()).index();
indexName = ((ShardSearchRequest) context.getRequest()).shardId().getIndexName();
} else if (context.getRequest() instanceof BroadcastShardRequest) {
indexName = ((BroadcastShardRequest) context.getRequest()).shardId().getIndexName();
} else {