Merge pull request #19271 from LeeDr/fixStoredFieldsMessage

Fix stored_fields message 'is not longer supported'
This commit is contained in:
Lee Drengenberg 2016-07-05 09:56:31 -05:00 committed by GitHub
commit dec620c0b0
3 changed files with 3 additions and 3 deletions

View File

@ -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);

View File

@ -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");
}

View File

@ -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 {