+# -*- coding: utf-8 -*-
+# This file is part of Wolnelektury, licensed under GNU Affero GPLv3 or later.
+# Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information.
+#
from django.core.management.base import BaseCommand
from glob import glob
def handle(self, *args, **opts):
from catalogue.models import Book
- import search
+ from search.index import Search
if opts['check']:
sfn = glob(settings.SEARCH_INDEX+'snippets/*')
except UnicodeDecodeError, ude:
print "error in snippets %d" % bkid
if opts['check2']:
- s = search.Search()
+ s = Search()
reader = s.searcher.getIndexReader()
numdocs = reader.numDocs()
for did in range(numdocs):