diff --git a/x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/LocalStateCompositeXPackPlugin.java b/x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/LocalStateCompositeXPackPlugin.java index 26436e497a644..823ca00a1929d 100644 --- a/x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/LocalStateCompositeXPackPlugin.java +++ b/x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/LocalStateCompositeXPackPlugin.java @@ -447,7 +447,10 @@ public void onIndexModule(IndexModule indexModule) { @Override public Function> getFieldFilter() { - List>> items = filterPlugins(MapperPlugin.class).stream().map(p -> p.getFieldFilter()).toList(); + List>> items = filterPlugins(MapperPlugin.class).stream() + .map(p -> p.getFieldFilter()) + .filter(p -> p.equals(NOOP_FIELD_FILTER) == false) + .toList(); if (items.size() > 1) { throw new UnsupportedOperationException("Only the security MapperPlugin should override this"); } else if (items.size() == 1) {