Skip to content

Commit 687e383

Browse files
Add header warning
1 parent ba24a24 commit 687e383

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

server/src/main/java/org/elasticsearch/rest/action/search/RestSearchAction.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
import org.elasticsearch.action.support.IndicesOptions;
1717
import org.elasticsearch.client.internal.node.NodeClient;
1818
import org.elasticsearch.common.Strings;
19+
import org.elasticsearch.common.logging.HeaderWarning;
1920
import org.elasticsearch.common.settings.Settings;
2021
import org.elasticsearch.core.Booleans;
2122
import org.elasticsearch.core.Nullable;
@@ -287,6 +288,9 @@ public static void parseSearchRequest(
287288
* effect, we can safely drop it.
288289
*/
289290
if (request.hasParam("ccs_minimize_roundtrips")) {
291+
String warning = "ccs_minimize_roundtrips always defaults to true in Cross Project Search context."
292+
+ " Setting it explicitly has no effect irrespective of the value specified and is ignored.";
293+
HeaderWarning.addWarning(warning);
290294
request.param("ccs_minimize_roundtrips");
291295
}
292296
} else {

0 commit comments

Comments
 (0)