Module org.elasticsearch.server
Class CrossProjectRoutingResolver
java.lang.Object
org.elasticsearch.search.crossproject.CrossProjectRoutingResolver
- All Implemented Interfaces:
ProjectRoutingResolver
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 (*).
-
Field Summary
Fields inherited from interface org.elasticsearch.search.crossproject.ProjectRoutingResolver
ORIGIN -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionresolve(String projectRouting, TargetProjects targetProjects) Filters the specified TargetProjects based on the provided project routing string
-
Constructor Details
-
CrossProjectRoutingResolver
public CrossProjectRoutingResolver()
-
-
Method Details
-
resolve
Filters the specified TargetProjects based on the provided project routing string- Specified by:
resolvein interfaceProjectRoutingResolver- Parameters:
projectRouting- the project_routing specified in the request objecttargetProjects- The target projects to be filtered- Returns:
- A new TargetProjects instance containing only the projects that match the project routing.
- 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.
-