Module org.elasticsearch.server
Class CrossProjectModeDecider
java.lang.Object
org.elasticsearch.search.crossproject.CrossProjectModeDecider
Utility class to determine whether Cross-Project Search (CPS) applies to an inbound request.
CPS applicability is controlled at three levels:
- Cluster level: The
serverless.cross_project.enabledsetting determines whether CPS processing is available at all. In the future, all Serverless projects will support CPS, so this distinction will depend on whether the cluster is a Serverless cluster or not. - API level: The
IndicesRequest.Replaceable.allowsCrossProject()method determines whether a particular request type supports CPS processing. - Request level: An
IndicesOptionsflag determines whether CPS should apply to the current request being processed. This fine-grained control is required because APIs that support CPS may also be used in contexts where CPS should not apply—for example, internal searches against the security system index to retrieve user roles, or CPS actions that execute in a flow where a parent action has already performed CPS processing.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanboolean
-
Constructor Details
-
CrossProjectModeDecider
-
-
Method Details
-
crossProjectEnabled
public boolean crossProjectEnabled() -
resolvesCrossProject
-