From 51a69c5814649b50c126ae3f2e3ad15720c93030 Mon Sep 17 00:00:00 2001 From: Martijn van Groningen Date: Mon, 21 Mar 2016 12:37:16 +0100 Subject: [PATCH] Fixes for upstream percolator changes Original commit: elastic/x-pack-elasticsearch@b31f9ff62b37ec384fd4a8d1897b51b321a55926 --- .../authz/accesscontrol/ShieldIndexSearcherWrapper.java | 4 ++-- .../src/test/resources/org/elasticsearch/transport/handlers | 2 -- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/elasticsearch/x-pack/shield/src/main/java/org/elasticsearch/shield/authz/accesscontrol/ShieldIndexSearcherWrapper.java b/elasticsearch/x-pack/shield/src/main/java/org/elasticsearch/shield/authz/accesscontrol/ShieldIndexSearcherWrapper.java index b7fc1e6b511..c2e6a2a7863 100644 --- a/elasticsearch/x-pack/shield/src/main/java/org/elasticsearch/shield/authz/accesscontrol/ShieldIndexSearcherWrapper.java +++ b/elasticsearch/x-pack/shield/src/main/java/org/elasticsearch/shield/authz/accesscontrol/ShieldIndexSearcherWrapper.java @@ -40,7 +40,6 @@ import org.elasticsearch.index.query.QueryShardContext; import org.elasticsearch.index.shard.IndexSearcherWrapper; import org.elasticsearch.index.shard.ShardId; import org.elasticsearch.index.shard.ShardUtils; -import org.elasticsearch.percolator.PercolatorService; import org.elasticsearch.shield.authz.InternalAuthorizationService; import org.elasticsearch.shield.authz.accesscontrol.DocumentSubsetReader.DocumentSubsetDirectoryReader; import org.elasticsearch.shield.license.ShieldLicenseState; @@ -229,9 +228,10 @@ public class ShieldIndexSearcherWrapper extends IndexSearcherWrapper { } private void resolvePercolatorFields(Set allowedFields) { - if (mapperService.hasMapping(PercolatorService.TYPE_NAME)) { + if (mapperService.hasMapping(PercolatorFieldMapper.TYPE_NAME)) { allowedFields.add(PercolatorFieldMapper.EXTRACTED_TERMS_FULL_FIELD_NAME); allowedFields.add(PercolatorFieldMapper.UNKNOWN_QUERY_FULL_FIELD_NAME); + allowedFields.add(PercolatorFieldMapper.EXTRACTED_TERMS_FULL_FIELD_NAME); } } diff --git a/elasticsearch/x-pack/shield/src/test/resources/org/elasticsearch/transport/handlers b/elasticsearch/x-pack/shield/src/test/resources/org/elasticsearch/transport/handlers index 94f93e379cb..4f8a63074b7 100644 --- a/elasticsearch/x-pack/shield/src/test/resources/org/elasticsearch/transport/handlers +++ b/elasticsearch/x-pack/shield/src/test/resources/org/elasticsearch/transport/handlers @@ -38,9 +38,7 @@ indices:data/read/field_stats[s] indices:data/read/get[s] indices:data/read/xpack/graph/explore indices:data/read/mget[shard][s] -indices:data/read/mpercolate[shard][s] indices:data/read/mtv[shard][s] -indices:data/read/percolate[s] indices:data/read/search[clear_scroll_contexts] indices:data/read/search[free_context/scroll] indices:data/read/search[free_context]