fnp
/
wolnelektury.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
polishing map fixes
[wolnelektury.git]
/
src
/
search
/
forms.py
diff --git
a/src/search/forms.py
b/src/search/forms.py
index
176c73e
..
3f6c99b
100644
(file)
--- 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']
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)
books = qs['book'].annotate(
search_vector=UnaccentSearchVector('title')
).filter(search_vector=squery)
@@
-169,7
+169,7
@@
class SearchFilters(forms.Form):
headline=SearchHeadline(
'text',
query,
headline=SearchHeadline(
'text',
query,
- config=
'polish'
,
+ config=
settings.SEARCH_CONFIG
,
start_sel='<strong>',
stop_sel='</strong>',
)
start_sel='<strong>',
stop_sel='</strong>',
)