mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-02-23 21:38:15 +00:00
Script sorting doesn't accept parameters, closes #1382.
This commit is contained in:
parent
724611f249
commit
9396735925
@ -51,6 +51,10 @@ public class ScriptSortParser implements SortParser {
|
||||
while ((token = parser.nextToken()) != XContentParser.Token.END_OBJECT) {
|
||||
if (token == XContentParser.Token.FIELD_NAME) {
|
||||
currentName = parser.currentName();
|
||||
} else if (token == XContentParser.Token.START_OBJECT) {
|
||||
if ("params".equals(currentName)) {
|
||||
params = parser.map();
|
||||
}
|
||||
} else if (token.isValue()) {
|
||||
if ("reverse".equals(currentName)) {
|
||||
reverse = parser.booleanValue();
|
||||
@ -60,8 +64,6 @@ public class ScriptSortParser implements SortParser {
|
||||
script = parser.text();
|
||||
} else if ("type".equals(currentName)) {
|
||||
type = parser.text();
|
||||
} else if ("params".equals(currentName)) {
|
||||
params = parser.map();
|
||||
} else if ("lang".equals(currentName)) {
|
||||
scriptLang = parser.text();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user