Add `sort_oder` and `sortOrder` as valid field names for defining the sort order in a Sort object.

Closes #2767
This commit is contained in:
Simon Willnauer 2013-03-15 08:42:19 +01:00
parent 5f20d81199
commit 33608c333f
1 changed files with 1 additions and 1 deletions

View File

@ -136,7 +136,7 @@ public class SortParseElement implements SearchParseElement {
} else if (token.isValue()) {
if ("reverse".equals(innerJsonName)) {
reverse = parser.booleanValue();
} else if ("order".equals(innerJsonName)) {
} else if ("order".equals(innerJsonName) || "sort_order".equals(innerJsonName) || "sortOrder".equals(innerJsonName)) {
if ("asc".equals(parser.text())) {
reverse = SCORE_FIELD_NAME.equals(fieldName);
} else if ("desc".equals(parser.text())) {