reindex command should use new interface
authorMarcin Koziej <marcin.koziej@nowoczesnapolska.org.pl>
Fri, 26 Oct 2012 11:00:50 +0000 (13:00 +0200)
committerMarcin Koziej <marcin.koziej@nowoczesnapolska.org.pl>
Fri, 26 Oct 2012 11:00:50 +0000 (13:00 +0200)
apps/search/management/commands/reindex.py

index 3b6517f..b1ec9c3 100755 (executable)
@@ -14,9 +14,8 @@ class Command(BaseCommand):
     def handle(self, *args, **opts):
         from catalogue.models import Book
         import search
-        idx = search.ReusableIndex()
-        idx.open()
-
+        idx = search.Index()
+        
         if not opts['just_tags']:
             if args:
                 books = []
@@ -33,4 +32,3 @@ class Command(BaseCommand):
                 idx.index_book(b)
         print 'Reindexing tags.'
         idx.index_tags()
-        idx.close()