Browse Source

[indexer] Fix delete indexes for collection types in new Indexer

Jenny Kim 10 năm trước cách đây
mục cha
commit
a4f778a

+ 1 - 1
desktop/libs/indexer/src/indexer/api2.py

@@ -76,7 +76,7 @@ def delete_indexes(request):
 
     for index in indexes:
       if index['type'] == 'collection':
-        searcher.delete_collection(index['name'])
+        searcher.delete_index(index['name'])
       elif index['type'] == 'alias':
         searcher.delete_alias(index['name'])
       else:

+ 1 - 1
desktop/libs/indexer/src/indexer/templates/indexes.mako

@@ -373,7 +373,7 @@ ${ commonheader(_("Solr Indexes"), "search", user, "60px") | n,unicode }
 
     self.deleteIndexes = function() {
       $.post("${ url('indexer:delete_indexes') }", {
-        "indexes": ko.mapping.toJSON(self.selectedJobs)
+        "indexes": ko.mapping.toJSON(self.selectedIndexes)
       }, function() {
         window.location.reload();
         $('#deleteIndex').modal('hide');