Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Script sorting doesn't accept parameters, closes #1382.

  • Loading branch information...
commit ae661359d311a82d6895a66f08b299290f020e77 1 parent bb6c031
@kimchy kimchy authored
View
6 modules/elasticsearch/src/main/java/org/elasticsearch/search/sort/ScriptSortParser.java
@@ -51,6 +51,10 @@
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 @@
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();
}
Please sign in to comment.
Something went wrong with that request. Please try again.