fnp
/
wolnelektury.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
skip fragments with no theme hit
[wolnelektury.git]
/
src
/
search
/
templatetags
/
search_tags.py
diff --git
a/src/search/templatetags/search_tags.py
b/src/search/templatetags/search_tags.py
index
f03aa67
..
da5a85b
100644
(file)
--- a/
src/search/templatetags/search_tags.py
+++ b/
src/search/templatetags/search_tags.py
@@
-25,7
+25,7
@@
def book_searched(context, result):
# We don't need hits which lead to sections but do not have
# snippets.
hits = filter(lambda (idx, h):
# We don't need hits which lead to sections but do not have
# snippets.
hits = filter(lambda (idx, h):
- result.snippets[idx] is not None or
'fragment' in h
,
+ result.snippets[idx] is not None or
('fragment' in h and h['themes_hit'])
,
enumerate(result.hits))
# print "[tmpl: from %d hits selected %d]" % (len(result.hits), len(hits))
enumerate(result.hits))
# print "[tmpl: from %d hits selected %d]" % (len(result.hits), len(hits))