X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/4668015907cd146c6607ba4a14611f4ea7ffe617..f70d03da0c52c06473d4a4ffea2d1a4305f1233e:/src/search/forms.py diff --git a/src/search/forms.py b/src/search/forms.py index 176c73ee8..3f6c99b75 100644 --- a/src/search/forms.py +++ b/src/search/forms.py @@ -158,8 +158,8 @@ class SearchFilters(forms.Form): def results(self): qs = self.get_querysets() query = self.cleaned_data['q'] - squery = UnaccentSearchQuery(query, config='polish') - query = SearchQuery(query, config='polish') + squery = UnaccentSearchQuery(query, config=settings.SEARCH_CONFIG) + query = SearchQuery(query, config=settings.SEARCH_CONFIG) books = qs['book'].annotate( search_vector=UnaccentSearchVector('title') ).filter(search_vector=squery) @@ -169,7 +169,7 @@ class SearchFilters(forms.Form): headline=SearchHeadline( 'text', query, - config='polish', + config=settings.SEARCH_CONFIG, start_sel='', stop_sel='', )