We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1c41f69 commit 5e53d01Copy full SHA for 5e53d01
server/src/main/java/org/elasticsearch/rest/action/search/RestSearchAction.java
@@ -245,7 +245,7 @@ public static void parseSearchRequest(
245
searchRequest.routing(request.param("routing"));
246
searchRequest.preference(request.param("preference"));
247
IndicesOptions indicesOptions = IndicesOptions.fromRequest(request, searchRequest.indicesOptions());
248
- if (crossProjectEnabled) {
+ if (crossProjectEnabled && searchRequest.allowsCrossProject()) {
249
indicesOptions = IndicesOptions.builder(indicesOptions)
250
.crossProjectModeOptions(new IndicesOptions.CrossProjectModeOptions(true))
251
.build();
0 commit comments