From: Marcin Koziej Date: Fri, 26 Oct 2012 11:00:50 +0000 (+0200) Subject: reindex command should use new interface X-Git-Url: https://git.mdrn.pl/wolnelektury.git/commitdiff_plain/6c916ba46721835a11f260fc9b3b7db9727dcf42?hp=--cc reindex command should use new interface --- 6c916ba46721835a11f260fc9b3b7db9727dcf42 diff --git a/apps/search/management/commands/reindex.py b/apps/search/management/commands/reindex.py index 3b6517f2e..b1ec9c3d7 100755 --- a/apps/search/management/commands/reindex.py +++ b/apps/search/management/commands/reindex.py @@ -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()