浏览代码

HUE-3294 [search] Simplify complex aggregated functions

Romain Rigaux 9 年之前
父节点
当前提交
9a92cf0
共有 2 个文件被更改,包括 3 次插入3 次删除
  1. 2 2
      apps/search/src/search/templates/common_search.mako
  2. 1 1
      desktop/libs/libsolr/src/libsolr/api.py

+ 2 - 2
apps/search/src/search/templates/common_search.mako

@@ -2640,8 +2640,8 @@ var HIT_OPTIONS = [
   { value: "sum", label: "${ _('Sum') }" },
   { value: "min", label: "${ _('Min') }" },
   { value: "max", label: "${ _('Max') }" },
-  { value: "sumsq", label: "${ _('Sum of square') }" },
-  { value: "median", label: "${ _('Median') }" }
+  { value: "median", label: "${ _('Median') }" },
+  { value: "percentile", label: "${ _('Percentiles') }" },
 ];
 
 function getHitOption(value){

+ 1 - 1
desktop/libs/libsolr/src/libsolr/api.py

@@ -610,7 +610,7 @@ class SolrApi(object):
         'aggregate': facet['properties']['aggregate'] if 'properties' in facet else facet['aggregate']
     }
 
-    if props['aggregate'] == 'median':
+    if props['aggregate'] == 'percentile':
       return 'percentile(%(field)s,50)' % props
     else:
       return '%(aggregate)s(%(field)s)' % props