From ab8f849dfaea6d2077e26a7de67a09055890a0e6 Mon Sep 17 00:00:00 2001 From: Richard Jones Date: Fri, 19 Sep 2014 20:29:17 +0100 Subject: [PATCH] add support for search order to es library --- es.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) {