浏览代码

HUE-8026 [indexer] Properly sort the list of indexes

Romain Rigaux 7 年之前
父节点
当前提交
08b1c4b05c
共有 1 个文件被更改,包括 2 次插入1 次删除
  1. 2 1
      desktop/libs/indexer/src/indexer/solr_client.py

+ 2 - 1
desktop/libs/indexer/src/indexer/solr_client.py

@@ -89,7 +89,8 @@ class SolrClient(object):
       LOG.warn(msg)
       raise PopupException(msg, detail=smart_str(e))
 
-    return indexes
+    return sorted(indexes, key=lambda index: index['name'])
+
 
   def create_index(self, name, fields, config_name=None, unique_key_field=None, df=None, shards=1, replication=1):
     if self.is_solr_cloud_mode():