changeset 5014:c56728051226

Xapian2009: xapian_wanted() was removed.
author Dmitrijs Milajevs <dimazest@gmail.com>
date Sat, 15 Aug 2009 20:36:56 +0200
parents 008009d8cfa0
children bc42755b5820
files MoinMoin/search/queryparser.py
diffstat 1 files changed, 0 insertions(+), 31 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/search/queryparser.py	Sat Aug 15 19:03:39 2009 +0200
+++ b/MoinMoin/search/queryparser.py	Sat Aug 15 20:36:56 2009 +0200
@@ -158,9 +158,6 @@
 
         return Query(Query.OP_OR, queries)
 
-    def xapian_wanted(self):
-        return False
-
     def xapian_need_postproc(self):
         return self.case
 
@@ -247,12 +244,6 @@
 
         return u'|'.join(result)
 
-    def xapian_wanted(self):
-        wanted = True
-        for term in self._subterms:
-            wanted = wanted and term.xapian_wanted()
-        return wanted
-
     def xapian_need_postproc(self):
         for term in self._subterms:
             if term.xapian_need_postproc():
@@ -387,10 +378,6 @@
 
         return matches
 
-    def xapian_wanted(self):
-        # XXX: Add option for term-based matching
-        return not self.use_re
-
     def xapian_term(self, request, connection):
         # XXX next version of xappy (>0.5) will provide Query class
         # it should be used.
@@ -456,9 +443,6 @@
 
         return matches
 
-    def xapian_wanted(self):
-        return True # only easy regexps possible
-
     def xapian_term(self, request, connection):
         if self.use_re:
             # XXX weight for a query!
@@ -555,9 +539,6 @@
 
         return matches
 
-    def xapian_wanted(self):
-        return True # only easy regexps possible
-
 
 class LanguageSearch(BaseFieldSearch):
     """ Search the pages written in a language """
@@ -583,9 +564,6 @@
         else:
             return []
 
-    def xapian_wanted(self):
-        return True # only easy regexps possible
-
 
 class CategorySearch(TextSearch):
     """ Search the pages belonging to a category """
@@ -620,9 +598,6 @@
     def highlight_re(self):
         return u'(\\b%s\\b)' % self._pattern
 
-    def xapian_wanted(self):
-        return True # only easy regexps possible
-
     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
@@ -660,9 +635,6 @@
         else:
             return []
 
-    def xapian_wanted(self):
-        return True # only easy regexps possible
-
 
 class DomainSearch(BaseFieldSearch):
     """ Search for pages belonging to a specific domain """
@@ -697,9 +669,6 @@
         else:
             return []
 
-    def xapian_wanted(self):
-        return True # only easy regexps possible
-
 
 ##############################################################################
 ### Parse Query