diff -r 9fbcd746f135 MoinMoin/search/Xapian/indexing.py
--- a/MoinMoin/search/Xapian/indexing.py	Fri Mar 12 13:52:00 2010 +0100
+++ b/MoinMoin/search/Xapian/indexing.py	Sun Mar 14 09:25:38 2010 +0100
@@ -97,6 +97,7 @@
         self.add_field_action('title', INDEX_FREETEXT, weight=100)
         self.add_field_action('title', STORE_CONTENT)
         self.add_field_action('content', INDEX_FREETEXT, spell=True)
+        self.add_field_action('content', STORE_CONTENT)
         self.add_field_action('domain', INDEX_EXACT)
         self.add_field_action('domain', STORE_CONTENT)
         self.add_field_action('lang', INDEX_EXACT)
@@ -297,7 +298,7 @@
         @param page: the page instance
         """
         body = page.get_raw_body()
-
+        # ToDo check category regex below
         prev, next = (0, 1)
         pos = 0
         while next:
diff -r 9fbcd746f135 MoinMoin/search/queryparser/expressions.py
--- a/MoinMoin/search/queryparser/expressions.py	Fri Mar 12 13:52:00 2010 +0100
+++ b/MoinMoin/search/queryparser/expressions.py	Sun Mar 14 09:25:38 2010 +0100
@@ -140,7 +140,32 @@
                 if field_to_check in data:
                     for term in data[field_to_check]:
                         if self.search_re.match(term):
-                            queries.append(connection.query_field(field_to_check, term))
+                            # To speed up search we try to minimize the length of re search queries.
+                            # for some search patterns we can minimize the query string
+                            # e.g. if someone searches for .* then any word in term matches.
+                            # this means for showing results we can use the first word.
+                            # for a search term like .*text.* we try to match for
+                            # (?ims)(?P<text>.\w*%s.\w*). If the result of this match
+                            # also matches for the original search pattern we use this result
+                            # for the query string.
+                            pattern = self.search_re.pattern
+                            if pattern.startswith('.*') and pattern.endswith('.*'):
+                                new_pattern = pattern.replace('.*', '.\w*')
+                                embedded_rawstr = "(?ims)(?P<value>%s)" %  new_pattern
+                                match_obj = re.search(embedded_rawstr, term)
+                                if match_obj:
+                                    value = match_obj.groups('value')[0]
+                                    if self.search_re.match(value):
+                                        queries.append(connection.query_field(field_to_check, value))
+                                        break
+                            elif pattern == '.*':
+                                queries.append(connection.query_field(field_to_check, term[0]))
+                                break
+                            # queries.append becomes very slow if too much content
+                            # is appended and your system can run out of memory.
+                            max_len = 3000
+                            queries.append(connection.query_field(field_to_check, term[:max_len]))
+                            break
             else:
                 # Check all fields
                 for field, terms in data.iteritems():
