浏览代码

HUE-2173 [dashboard] Do not error on sorting on text facets

Romain Rigaux 8 年之前
父节点
当前提交
6ee1041b98
共有 1 个文件被更改,包括 1 次插入4 次删除
  1. 1 4
      desktop/libs/libsolr/src/libsolr/api.py

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

@@ -146,10 +146,6 @@ class SolrApi(object):
           _f = {}
           if facet['properties']['facets']:
             self._n_facet_dimension(facet, _f, facet['properties']['facets'], 1, timeFilter)
-            if facet['widgetType'] == 'text-facet-widget':
-              _fname = _f['facet'].keys()[0]
-              _f['sort'] = {_fname: facet['properties']['sort']}
-              # domain = '-d2:NaN' # Solr 6.4
 
           if facet['properties'].get('domain'):
             if facet['properties']['domain'].get('blockParent') or facet['properties']['domain'].get('blockChildren'):
@@ -168,6 +164,7 @@ class SolrApi(object):
 
             if sort.get('count') == 'default':
               sort['count'] = 'desc'
+
             dim_key = [key for key in _f['facet'].keys() if 'dim' in key][0]
             _f['facet'][dim_key].update({
                   'excludeTags': facet['id'],