# HG changeset patch # User Ludovic Chabant # Date 1539067365 25200 # Node ID 385de1daefb32c43fe5383043481358630db1ade # Parent f78ca60826ba2ba83ef20ce090be791e695ee8bf core: Properly show page titles when only contents match a search query. diff -r f78ca60826ba -r 385de1daefb3 wikked/indexer/whooshidx.py --- 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) -