fail on malformed sort
This commit is contained in:
parent
6a1cb8f61b
commit
72c76c2799
|
@ -79,6 +79,8 @@ public class SortParseElement implements SearchParseElement {
|
|||
addCompoundSortField(parser, context, sortFields);
|
||||
} else if (token == XContentParser.Token.VALUE_STRING) {
|
||||
addSortField(context, sortFields, parser.text(), false, false, null, null, null, null);
|
||||
} else {
|
||||
throw new ElasticSearchIllegalArgumentException("malformed sort format, within the sort array, an object, or an actual string are allowed");
|
||||
}
|
||||
}
|
||||
} else if (token == XContentParser.Token.VALUE_STRING) {
|
||||
|
|
Loading…
Reference in New Issue