mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-02-17 10:25:15 +00:00
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…
x
Reference in New Issue
Block a user