changeset 3440:41ad5058952b

disabled xapian_stemming by default, added some comments to problematic code enabled by it
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Sat, 22 Mar 2008 03:07:36 +0100
parents b9879146620d
children 8230be5f24d7
files MoinMoin/config/multiconfig.py MoinMoin/search/queryparser.py
diffstat 2 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/config/multiconfig.py	Sun Mar 30 03:46:31 2008 +0200
+++ b/MoinMoin/config/multiconfig.py	Sat Mar 22 03:07:36 2008 +0100
@@ -727,7 +727,7 @@
 
     xapian_search = False
     xapian_index_dir = None
-    xapian_stemming = True
+    xapian_stemming = False
     xapian_index_history = False
     search_results_per_page = 10
 
--- a/MoinMoin/search/queryparser.py	Sun Mar 30 03:46:31 2008 +0200
+++ b/MoinMoin/search/queryparser.py	Sat Mar 22 03:07:36 2008 +0100
@@ -331,7 +331,7 @@
         # Search in page body
         body = page.get_raw_body()
         for match in self.search_re.finditer(body):
-            if page.request.cfg.xapian_stemming:
+            if page.request.cfg.xapian_stemming: # XXX if True fails fulltext searches for "bcd" if there is content "abcd"
                 # somewhere in regular word
                 if body[match.start()] not in config.chars_upper and \
                         body[match.start()-1] in config.chars_lower:
@@ -452,7 +452,7 @@
         logging.debug("TitleSearch searching page %r for (negated = %r) %r" % (page.page_name, self.negated, self._pattern))
         matches = []
         for match in self.search_re.finditer(page.page_name):
-            if page.request.cfg.xapian_stemming:
+            if page.request.cfg.xapian_stemming: # XXX if True this fails title searches for "foo" even if there is a page "foo"
                 # somewhere in regular word
                 if not self.case and \
                         page.page_name[match.start()] not in config.chars_upper and \