Skip to content

Commit

Permalink
Script sorting doesn't accept parameters, closes #1382.
Browse files Browse the repository at this point in the history
  • Loading branch information
kimchy committed Oct 18, 2011
1 parent 724611f commit 9396735
Showing 1 changed file with 4 additions and 2 deletions.
Expand Up @@ -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();
Expand All @@ -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();
}
Expand Down

0 comments on commit 9396735

Please sign in to comment.