From a033f9507292cca7d58a9993d33151569a521bf9 Mon Sep 17 00:00:00 2001 From: Simon Willnauer Date: Wed, 9 Mar 2016 19:54:27 +0100 Subject: [PATCH] Use ShardId#getIndexName() since index name has been removed from ShardSearchRequest Original commit: elastic/x-pack-elasticsearch@ba997d0ae32edef136e66835835006afda5488df --- .../shield/authz/accesscontrol/OptOutQueryCache.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/elasticsearch/x-pack/shield/src/main/java/org/elasticsearch/shield/authz/accesscontrol/OptOutQueryCache.java b/elasticsearch/x-pack/shield/src/main/java/org/elasticsearch/shield/authz/accesscontrol/OptOutQueryCache.java index 3e3006a0101..ce8e6cfa7c7 100644 --- a/elasticsearch/x-pack/shield/src/main/java/org/elasticsearch/shield/authz/accesscontrol/OptOutQueryCache.java +++ b/elasticsearch/x-pack/shield/src/main/java/org/elasticsearch/shield/authz/accesscontrol/OptOutQueryCache.java @@ -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 {