changeset 5011:5db393a37ab5

Xapian2009: xapian_need_postproc() was moved to the BaseExpression.
author Dmitrijs Milajevs <dimazest@gmail.com>
date Sat, 15 Aug 2009 18:59:06 +0200
parents 7762acfc26c9
children 7ab1128bae9a
files MoinMoin/search/queryparser.py
diffstat 1 files changed, 3 insertions(+), 22 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/search/queryparser.py	Sat Aug 15 18:58:07 2009 +0200
+++ b/MoinMoin/search/queryparser.py	Sat Aug 15 18:59:06 2009 +0200
@@ -149,6 +149,9 @@
     def xapian_wanted(self):
         return False
 
+    def xapian_need_postproc(self):
+        return self.case
+
     def __unicode__(self):
         neg = self.negated and '-' or ''
         return u'%s%s"%s"' % (neg, self._tag, unicode(self._pattern))
@@ -390,9 +393,6 @@
         # XXX: Add option for term-based matching
         return not self.use_re
 
-    def xapian_need_postproc(self):
-        return self.case
-
     def xapian_term(self, request, connection):
         # XXX next version of xappy (>0.5) will provide Query class
         # it should be used.
@@ -480,9 +480,6 @@
     def xapian_wanted(self):
         return True # only easy regexps possible
 
-    def xapian_need_postproc(self):
-        return self.case
-
     def xapian_term(self, request, connection):
         if self.use_re:
             # XXX weight for a query!
@@ -593,9 +590,6 @@
     def xapian_wanted(self):
         return True # only easy regexps possible
 
-    def xapian_need_postproc(self):
-        return self.case
-
 
 class LanguageSearch(BaseFieldSearch):
     """ Search the pages written in a language """
@@ -635,10 +629,6 @@
     def xapian_wanted(self):
         return True # only easy regexps possible
 
-    def xapian_need_postproc(self):
-        return False # case-sensitivity would make no sense
-
-
 class CategorySearch(TextSearch):
     """ Search the pages belonging to a category """
 
@@ -676,9 +666,6 @@
     def xapian_wanted(self):
         return True # only easy regexps possible
 
-    def xapian_need_postproc(self):
-        return self.case
-
     def xapian_term(self, request, connection):
         # XXX Probably, it is a good idea to inherit this class from
         # BaseFieldSearch and get rid of this definition
@@ -729,9 +716,6 @@
     def xapian_wanted(self):
         return True # only easy regexps possible
 
-    def xapian_need_postproc(self):
-        return False # case-sensitivity would make no sense
-
 
 class DomainSearch(BaseFieldSearch):
     """ Search for pages belonging to a specific domain """
@@ -779,9 +763,6 @@
     def xapian_wanted(self):
         return True # only easy regexps possible
 
-    def xapian_need_postproc(self):
-        return False # case-sensitivity would make no sense
-
 
 ##############################################################################
 ### Parse Query