Skip to content

Commit cf69a1c

Browse files
Slight code comment changes
1 parent 49a341b commit cf69a1c

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

server/src/main/java/org/elasticsearch/action/search/TransportSearchAction.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -383,7 +383,7 @@ private void executeRequest(
383383
* CPS is enabled, i.e. resolvesCrossProject() returns true, we need to modify and relax the
384384
* indices options. This is to:
385385
* a) Prevent the downstream code from throwing an error if an index is not found since in
386-
* CPS, an index can exist either on the origin or on different linked project(s).
386+
* CPS, an index can exist anywhere.
387387
* b) Prevent the linked projects from re-interpreting the index expressions as CPS expressions
388388
* and rather treat them as canonical/standard ones.
389389
*/
@@ -1121,9 +1121,9 @@ Map<String, SearchShardsResponse> createFinalResponse() {
11211121
/*
11221122
* It may be possible that indices do not exist on the project that SearchShards API is targeting.
11231123
* In such cases, it throws an error because it calls the index resolution APIs underneath. We relax
1124-
* the index options to prevent this from happening. Also, it's fine to pass in these relaxed options
1125-
* to it because SearchShardsRequest#allowsCrossProject() returns false anyway and the index rewriting
1126-
* does not happen downstream.
1124+
* the index options to prevent this from happening, iff this is a CPS request and CPS is enabled.
1125+
* Also, it's fine to pass in these relaxed options to it because SearchShardsRequest#allowsCrossProject()
1126+
* returns false anyway and the index rewriting does not happen downstream.
11271127
*/
11281128
IndicesOptions searchShardsIdxOpts = resolvesCrossProject
11291129
? indicesOptionsForCrossProjectFanout(originalIdxOpts)

0 commit comments

Comments
 (0)