Class EnrichPolicyResolver

java.lang.Object
org.elasticsearch.xpack.esql.enrich.EnrichPolicyResolver

public class EnrichPolicyResolver extends Object
Resolves enrich policies across clusters in several steps: 1. Calculates the policies that need to be resolved for each cluster, see lookupPolicies(java.util.Collection<java.lang.String>, boolean, java.util.Collection<org.elasticsearch.xpack.esql.enrich.EnrichPolicyResolver.UnresolvedPolicy>, org.elasticsearch.action.ActionListener<java.util.Map<java.lang.String, org.elasticsearch.xpack.esql.enrich.EnrichPolicyResolver.LookupResponse>>). 2. Sends out EnrichPolicyResolver.LookupRequest to each cluster to resolve policies. Internally, a remote cluster handles the lookup in two steps: - 2.1 Ensures the caller has permission to access the enrich policies. - 2.2 For each found enrich policy, uses IndexResolver to resolve the mappings of the concrete enrich index. 3. For each unresolved policy, combines the lookup results to compute the actual enrich policy and mappings depending on the enrich mode. This approach requires at most one cross-cluster call for each cluster.