changeset 3633:25822f14e4ea

search: support mimetype: search for builtin (slow) engine, too
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Thu, 22 May 2008 20:31:30 +0200
parents f00bf7ef6ee8
children de4a7a1c89dd
files MoinMoin/search/queryparser.py
diffstat 1 files changed, 6 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/search/queryparser.py	Thu May 22 18:54:01 2008 +0200
+++ b/MoinMoin/search/queryparser.py	Thu May 22 20:31:30 2008 +0200
@@ -793,7 +793,12 @@
         return u""
 
     def search(self, page):
-        return None
+        page_mimetype = u'text/%s' % page.pi['format']
+        matches = self.search_re.search(page_mimetype)
+        if matches and not self.negated or not matches and self.negated:
+            return [Match()]
+        else:
+            return None
 
     def xapian_wanted(self):
         return True # only easy regexps possible