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) {
|
while ((token = parser.nextToken()) != XContentParser.Token.END_OBJECT) {
|
||||||
if (token == XContentParser.Token.FIELD_NAME) {
|
if (token == XContentParser.Token.FIELD_NAME) {
|
||||||
currentName = parser.currentName();
|
currentName = parser.currentName();
|
||||||
|
} else if (token == XContentParser.Token.START_OBJECT) {
|
||||||
|
if ("params".equals(currentName)) {
|
||||||
|
params = parser.map();
|
||||||
|
}
|
||||||
} else if (token.isValue()) {
|
} else if (token.isValue()) {
|
||||||
if ("reverse".equals(currentName)) {
|
if ("reverse".equals(currentName)) {
|
||||||
reverse = parser.booleanValue();
|
reverse = parser.booleanValue();
|
||||||
@ -60,8 +64,6 @@ public class ScriptSortParser implements SortParser {
|
|||||||
script = parser.text();
|
script = parser.text();
|
||||||
} else if ("type".equals(currentName)) {
|
} else if ("type".equals(currentName)) {
|
||||||
type = parser.text();
|
type = parser.text();
|
||||||
} else if ("params".equals(currentName)) {
|
|
||||||
params = parser.map();
|
|
||||||
} else if ("lang".equals(currentName)) {
|
} else if ("lang".equals(currentName)) {
|
||||||
scriptLang = parser.text();
|
scriptLang = parser.text();
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user