Skip to content

Commit

Permalink
Added sort_mode and sortMode parameters to _geo_distance sort.
Browse files Browse the repository at this point in the history
Previously it just support the "mode" parameter, which is
inconsistent

Closes elastic#3717
  • Loading branch information
clintongormley committed Sep 17, 2013
1 parent e12035d commit c60ac22
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ public SortField parse(XContentParser parser, SearchContext context) throws Exce
} else if ("normalize".equals(currentName)) {
normalizeLat = parser.booleanValue();
normalizeLon = parser.booleanValue();
} else if ("mode".equals(currentName)) {
} else if ("sort_mode".equals(currentName) || "sortMode".equals(currentName) || "mode".equals(currentName)) {
sortMode = SortMode.fromString(parser.text());
} else if ("nested_path".equals(currentName) || "nestedPath".equals(currentName)) {
nestedPath = parser.text();
Expand Down

0 comments on commit c60ac22

Please sign in to comment.