X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/4fb0bfd1b7351af7d83a2cc69e7fca666a359160..efc2356b4d523518deb4a7bfdd4a554aa3529fa6:/apps/search/index.py?ds=sidebyside diff --git a/apps/search/index.py b/apps/search/index.py index b689c763c..a0bf71588 100644 --- a/apps/search/index.py +++ b/apps/search/index.py @@ -18,7 +18,7 @@ from lucene import SimpleFSDirectory, NIOFSDirectory, IndexWriter, IndexReader, # KeywordAnalyzer # Initialize jvm -JVM = initVM(CLASSPATH) +JVM = initVM(CLASSPATH, maxheap=settings.JVM_MAXHEAP) import sys import os @@ -1409,8 +1409,9 @@ class Search(IndexStore): else: tag = catalogue.models.Tag.objects.get(id=doc.get("tag_id")) # don't add the pdcounter tag if same tag already exists - if not (is_pdcounter and filter(lambda t: tag.slug == t.slug, tags)): - tags.append(tag) + + tags.append(tag) + except catalogue.models.Tag.DoesNotExist: pass except PDCounterAuthor.DoesNotExist: pass except PDCounterBook.DoesNotExist: pass