changeset 3460:90893e33a312

QueryParser: use global configuration with text strings (fixes titlesearch)
author Johannes Berg <johannes AT sipsolutions DOT net>
date Mon, 31 Mar 2008 14:24:43 +0200
parents 6fa56b0f0de4
children 2f1100735fa4
files MoinMoin/search/queryparser.py
diffstat 1 files changed, 6 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/search/queryparser.py	Thu Mar 27 21:05:42 2008 +0100
+++ b/MoinMoin/search/queryparser.py	Mon Mar 31 14:24:43 2008 +0200
@@ -989,7 +989,12 @@
                     # before parsing...
                     if not item:
                         raise ValueError("Term too short")
-                    terms.append(TextSearch(item))
+                    regex = self.regex
+                    case = self.case
+                    if self.titlesearch:
+                        terms.append(TitleSearch(item, use_re=regex, case=case))
+                    else:
+                        terms.append(TextSearch(item, use_re=regex, case=case))
             elif isinstance(item, tuple):
                 negate = item[0] == M
                 title_search = self.titlesearch