ClusterState contains Enrich Policy metadata information, that can be useful to other plugins.
As of now, ClusterState metadata contains [EnrichMetadata](https://github.com/elastic/elasticsearch/blob/main/x-pack/plugin/enrich/src/main/java/org/elasticsearch/xpack/enrich/EnrichMetadata.java) objects, that contain [EnrichPolicy](https://github.com/elastic/elasticsearch/blob/main/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/enrich/EnrichPolicy.java) objects.
While `EnrichPolicy` class is in `core`, `EnrichMetadata` is in `enrich` plugin, so it's practically impossible to access EnrichPolicy information without creating a dependency from `enrich` plugin.
It would be good to have an interface in core to avoid this dependency.
x-pack/plugin/enrich/src/main/java/org/elasticsearch/xpack/enrich/EnrichStore.java
policy.getQuery(),
                policy.getIndices(),
                policy.getMatchField(),
                policy.getEnrichFields(),
                Version.CURRENT
            );
        } else {
            finalPolicy = policy;
        }
        updateClusterState(clusterService, handler, current -> {
            for (String indexExpression : finalPolicy.getIndices()) {
                
                String[] concreteIndices = indexNameExpressionResolver.concreteIndexNames(
                    current,
                    IndicesOptions.strictExpandOpen(),
                    indexExpression
                );
                for (String concreteIndex : concreteIndices) {
                    IndexMetadata imd = current.getMetadata().index(concreteIndex);
                    assert imd != null;
                    MappingMetadata mapping = imd.mapping();
                    if (mapping == null) {
                        throw new IllegalArgumentException("source index [" + concreteIndex + "] has no mapping");
                    }
                    Map<String, Object> mappingSource = mapping.getSourceAsMap();
                    EnrichPolicyRunner.validateMappings(name, finalPolicy, concreteIndex, mappingSource);
                }
            }
            final Map<String, EnrichPolicy> policies = getPolicies(current);
            EnrichPolicy existing = policies.putIfAbsent(name, finalPolicy);