Skip to content

Commit

Permalink
add support for search order to es library
Browse files Browse the repository at this point in the history
  • Loading branch information
richard-jones committed Sep 19, 2014
1 parent 4565970 commit ab8f849
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion es.js
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ function elasticSearchQuery(params) {

var facet = {}
if (defn.type === "terms") {
facet["terms"] = {"field" : defn["field"], "size" : size}
facet["terms"] = {"field" : defn["field"], "size" : size, "order" : defn["order"]}
} else if (defn.type === "range") {
var ranges = []
for (var r=0; r < defn["range"].length; r=r+1) {
Expand Down

0 comments on commit ab8f849

Please sign in to comment.