Class CrossProjectRoutingResolver

java.lang.Object
org.elasticsearch.search.crossproject.CrossProjectRoutingResolver

public class CrossProjectRoutingResolver extends Object
Tech Preview. Resolves a single entry _alias for a cross-project request specifying a project_routing. We currently only support a single entry routing containing either a specific name, a prefix, a suffix, or a match-all (*).
  • Constructor Details

    • CrossProjectRoutingResolver

      public CrossProjectRoutingResolver()
  • Method Details

    • resolve

      public List<ProjectRoutingInfo> resolve(String projectRouting, ProjectRoutingInfo originProject, List<ProjectRoutingInfo> candidateProjects)
      Parameters:
      projectRouting - the project_routing specified in the request object.
      originProject - the project alias where this function is being called.
      candidateProjects - the list of project aliases for the active request. This list must *NOT* contain the originProject entry.
      Returns:
      the filtered list of projects matching the projectRouting, or an empty list if none are found.
      Throws:
      ElasticsearchStatusException - if the projectRouting is null, empty, does not start with "_alias:", contains more than one entry, or contains an '*' in the middle of a string.