From: Marcin Koziej Date: Wed, 9 Nov 2011 09:19:22 +0000 (+0100) Subject: don't index tags from db. X-Git-Url: https://git.mdrn.pl/wolnelektury.git/commitdiff_plain/3b73241bfb6fa47f8b7c1d6629a3e537d34aad3c don't index tags from db. --- diff --git a/apps/search/index.py b/apps/search/index.py index 2ae909a84..7ec88c619 100644 --- a/apps/search/index.py +++ b/apps/search/index.py @@ -125,7 +125,7 @@ class Index(IndexStore): doc = self.create_book_doc(book) doc.add(Field("slug", book.slug, Field.Store.NO, Field.Index.ANALYZED_NO_NORMS)) - doc.add(Field("tags", ','.join([t.name for t in book.tags]), Field.Store.NO, Field.Index.ANALYZED)) + #doc.add(Field("tags", ','.join([t.name for t in book.tags]), Field.Store.NO, Field.Index.ANALYZED)) doc.add(Field("is_book", 'true', Field.Store.NO, Field.Index.NOT_ANALYZED)) # validator, name @@ -288,11 +288,12 @@ class ReusableIndex(Index): @staticmethod def close_reusable(): if ReusableIndex.index is not None: - print("closing index") + print("wait for indexing to finish") for job in ReusableIndex.pool_jobs: job.get() sys.stdout.write('.') sys.stdout.flush() + print("done.") ReusableIndex.pool.close() ReusableIndex.index.optimize()