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 301d2a0 commit a3dc375Copy full SHA for a3dc375
server/src/main/java/org/elasticsearch/search/builder/SearchSourceBuilder.java
@@ -1424,7 +1424,7 @@ private SearchSourceBuilder parseXContent(
1424
if (token == XContentParser.Token.FIELD_NAME) {
1425
currentFieldName = parser.currentName();
1426
} else if (token.isValue()) {
1427
- if (PROJECT_ROUTING.match(currentFieldName, parser.getDeprecationHandler())) {
+ if (PROJECT_ROUTING.match(currentFieldName, parser.getDeprecationHandler()) && searchRequest != null) {
1428
/*
1429
* If project_routing was specified as a query parameter too, setProjectRouting() will throw
1430
* an error to prevent setting twice or overwriting previously set value.
0 commit comments