Merge pull request #19271 from LeeDr/fixStoredFieldsMessage
Fix stored_fields message 'is not longer supported'
This commit is contained in:
commit
dec620c0b0
|
@ -74,7 +74,7 @@ public final class InnerHitBuilder extends ToXContentToBytes implements Writeabl
|
|||
PARSER.declareStringArray(InnerHitBuilder::setStoredFieldNames, SearchSourceBuilder.STORED_FIELDS_FIELD);
|
||||
PARSER.declareField((p, i, c) -> {
|
||||
throw new ParsingException(p.getTokenLocation(), "The field [" +
|
||||
SearchSourceBuilder.FIELDS_FIELD + "] is not longer supported, please use [" +
|
||||
SearchSourceBuilder.FIELDS_FIELD + "] is no longer supported, please use [" +
|
||||
SearchSourceBuilder.STORED_FIELDS_FIELD + "] to retrieve stored fields or _source filtering " +
|
||||
"if the field is not stored");
|
||||
}, SearchSourceBuilder.FIELDS_FIELD, ObjectParser.ValueType.STRING_ARRAY);
|
||||
|
|
|
@ -178,7 +178,7 @@ public class RestSearchAction extends BaseRestHandler {
|
|||
|
||||
if (request.param("fields") != null) {
|
||||
throw new IllegalArgumentException("The parameter [" +
|
||||
SearchSourceBuilder.FIELDS_FIELD + "] is not longer supported, please use [" +
|
||||
SearchSourceBuilder.FIELDS_FIELD + "] is no longer supported, please use [" +
|
||||
SearchSourceBuilder.STORED_FIELDS_FIELD + "] to retrieve stored fields or _source filtering " +
|
||||
"if the field is not stored");
|
||||
}
|
||||
|
|
|
@ -1073,7 +1073,7 @@ public final class SearchSourceBuilder extends ToXContentToBytes implements Writ
|
|||
searchAfterBuilder = SearchAfterBuilder.fromXContent(parser, context.getParseFieldMatcher());
|
||||
} else if (context.getParseFieldMatcher().match(currentFieldName, FIELDS_FIELD)) {
|
||||
throw new ParsingException(parser.getTokenLocation(), "The field [" +
|
||||
SearchSourceBuilder.FIELDS_FIELD + "] is not longer supported, please use [" +
|
||||
SearchSourceBuilder.FIELDS_FIELD + "] is no longer supported, please use [" +
|
||||
SearchSourceBuilder.STORED_FIELDS_FIELD + "] to retrieve stored fields or _source filtering " +
|
||||
"if the field is not stored");
|
||||
} else {
|
||||
|
|
Loading…
Reference in New Issue