X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/7f0caf88dd3aac2e4d5bb4ee064137e03ecd4f03..01ba89e7caab3e386df4b1a99a93b98a237a0457:/apps/search/index.py diff --git a/apps/search/index.py b/apps/search/index.py index f9a3c89ae..31417ca87 100644 --- a/apps/search/index.py +++ b/apps/search/index.py @@ -1,5 +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.conf import settings import os @@ -850,7 +852,7 @@ class Search(SolrIndex): q |= self.index.Q(**{field: query + "*"}) else: q |= self.make_term_query(query, field=field) - qu = self.index.query(q).exclude(tag_category="book") + qu = self.index.query(q) return self.search_tags(qu, pdcounter=pdcounter) @@ -938,3 +940,7 @@ class Search(SolrIndex): for f in filters: query = query.query(f) return query + + +if getattr(settings, 'SEARCH_MOCK', False): + from .mock_search import Search