Description

If you jump to a page

  1. with the "Search" form at the top, or
  2. with selecting the name from a [[FullSearch(t:blabla)]] list,

the search term gets highlighted. This is disadvantagous because of two reasons:

  1. it´s stupid and surprising to highlight the title match in the whole text
  2. it bypasses the caching.

As these are (at least my) major navigation instruments and caching is important for the performance of the wiki, I consider this bug.

Steps to reproduce

Click on the link in [[FullSearchCached(t:Title t:highlight)]] and you will see all title and highlight being highlighted and caching is not performed.

Example

Details

Patch:

Index: search.py
===================================================================
RCS file: /cvs/TPS/moin/MoinMoin/search.py,v
retrieving revision 1.1.1.2
diff -u -r1.1.1.2 search.py
--- search.py   22 Mar 2006 09:35:59 -0000      1.1.1.2
+++ search.py   23 Nov 2006 19:27:37 -0000
@@ -309,7 +309,9 @@
         return u'%s!"%s"' % (neg, unicode(self._pattern))

     def highlight_re(self):
-        return u"(%s)" % self._pattern
+        # 2b, no highlight for title pattern (speedup)
+        return u""
+        #return u"(%s)" % self._pattern

     def pageFilter(self):
         """ Page filter function for single title search """

MoinMoin Version

OS and Version

Python Version

Server Setup

Server Details

Language you are using the wiki in (set in the browser/UserPreferences)

Workaround

Discussion

Plan


CategoryMoinMoinBugFixed

MoinMoin: MoinMoinBugs/TitleSearchShouldNotHighlight (last edited 2008-05-01 22:17:16 by ThomasWaldmann)