X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/cad95a5f21346628d1dffa3b50ffa8f38baa5972..cbf4353403bf60dd0966e060a78893685080ae0b:/src/search/index.py diff --git a/src/search/index.py b/src/search/index.py index a1c2716a8..d3377b103 100644 --- 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: