diff --git a/es.js b/es.js index 6dcf69e..4ee0764 100644 --- a/es.js +++ b/es.js @@ -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) {