X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/38f324dec64ba8adffcc795095023557b8a7a39c..4bb3e264dc9d9953c6a1ffcb0290a2ba0e0c094b:/apps/search/management/commands/snippets.py?ds=sidebyside diff --git a/apps/search/management/commands/snippets.py b/apps/search/management/commands/snippets.py index 058ea052e..40310eda1 100755 --- a/apps/search/management/commands/snippets.py +++ b/apps/search/management/commands/snippets.py @@ -1,3 +1,7 @@ +# -*- 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 @@ -20,7 +24,7 @@ class Command(BaseCommand): 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/*') @@ -35,7 +39,7 @@ class Command(BaseCommand): 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):