瀏覽代碼

[search] Rename get_solr_collection to get_solr_collections appropriately

Romain Rigaux 10 年之前
父節點
當前提交
043e34632f
共有 1 個文件被更改,包括 3 次插入4 次删除
  1. 3 4
      apps/search/src/search/search_controller.py

+ 3 - 4
apps/search/src/search/search_controller.py

@@ -105,20 +105,19 @@ class SearchController(object):
     return result
 
   def is_collection(self, collection_name):
-    solr_collections = SolrApi(SOLR_URL.get(), self.user).collections()
-    return collection_name in solr_collections
+    return collection_name in self.get_solr_collections()
 
   def is_core(self, core_name):
     solr_cores = SolrApi(SOLR_URL.get(), self.user).cores()
     return core_name in solr_cores
 
-  def get_solr_collection(self):
+  def get_solr_collections(self):
     return SolrApi(SOLR_URL.get(), self.user).collections()
 
   def get_all_indexes(self, show_all=False):
     indexes = []
     try:
-      indexes = self.get_solr_collection().keys()
+      indexes = self.get_solr_collections().keys()
     except:
       LOG.exception('failed to get indexes')