Skip to content

Commit fb81e2c

Browse files
committed
Fix template _msearch with extra tokens
This change removes the check for extra tokens when parsing a source generated by a templated _msearch request. This was added unintentionally in elastic#29428 but the intent of this modification was to validate simple _search request only.
1 parent 0ae627f commit fb81e2c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

modules/lang-mustache/src/main/java/org/elasticsearch/script/mustache/TransportSearchTemplateAction.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ static SearchRequest convert(SearchTemplateRequest searchTemplateRequest, Search
112112
try (XContentParser parser = XContentFactory.xContent(XContentType.JSON)
113113
.createParser(xContentRegistry, LoggingDeprecationHandler.INSTANCE, source)) {
114114
SearchSourceBuilder builder = SearchSourceBuilder.searchSource();
115-
builder.parseXContent(parser, true);
115+
builder.parseXContent(parser, false);
116116
builder.explain(searchTemplateRequest.isExplain());
117117
builder.profile(searchTemplateRequest.isProfile());
118118
searchRequest.source(builder);

0 commit comments

Comments
 (0)