소스 검색

[search] Rename get_solr_collection to get_solr_collections appropriately

Romain Rigaux 10 년 전
부모
커밋
043e346
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')