Mercurial > wikked
changeset 470:385de1daefb3
core: Properly show page titles when only contents match a search query.
author | Ludovic Chabant <ludovic@chabant.com> |
---|---|
date | Mon, 08 Oct 2018 23:42:45 -0700 |
parents | f78ca60826ba |
children | b5b0eb75f980 |
files | wikked/indexer/whooshidx.py |
diffstat | 1 files changed, 1 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/wikked/indexer/whooshidx.py Mon Oct 08 23:41:56 2018 -0700 +++ b/wikked/indexer/whooshidx.py Mon Oct 08 23:42:45 2018 -0700 @@ -100,7 +100,7 @@ for result in results: hit = HitResult( result['url'], - result.highlights('title'), + result.highlights('title') or result['title'], result.highlights('text')) hits.append(hit) return hits @@ -133,4 +133,3 @@ def _unindexPage(self, writer, url): logger.debug("Removing '%s' from index." % url) writer.delete_by_term('url', url) -