fnp
/
wolnelektury.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
70e0222
)
fix snippets in search (diacritics)
author
Jan Szejko
<janek37@gmail.com>
Fri, 23 Mar 2018 14:17:14 +0000
(15:17 +0100)
committer
Jan Szejko
<janek37@gmail.com>
Fri, 23 Mar 2018 14:17:14 +0000
(15:17 +0100)
src/search/index.py
patch
|
blob
|
history
diff --git
a/src/search/index.py
b/src/search/index.py
index
a1c2716
..
d3377b1
100644
(file)
--- a/
src/search/index.py
+++ b/
src/search/index.py
@@
-957,6
+957,8
@@
class Search(SolrIndex):
text = snippets.get((int(position),
int(length)))
snip = self.index.highlight(text=text, field=field, q=query)
+ if not snip and field == 'text':
+ snip = self.index.highlight(text=text, field='text_nonstem', q=query)
if snip not in snips:
snips[idx] = snip
if snip: