changeset 951:cbb305935d49

prepare for using RegexPlugin
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Sun, 09 Oct 2011 17:02:28 +0200
parents 57ac61f78053
children 308ba8de39c4
files MoinMoin/storage/middleware/indexing.py
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/storage/middleware/indexing.py	Sun Oct 09 16:07:11 2011 +0200
+++ b/MoinMoin/storage/middleware/indexing.py	Sun Oct 09 17:02:28 2011 +0200
@@ -64,7 +64,7 @@
 from whoosh.index import open_dir, create_in, EmptyIndexError
 from whoosh.writing import AsyncWriter
 from whoosh.filedb.multiproc import MultiSegmentWriter
-from whoosh.qparser import QueryParser, MultifieldParser
+from whoosh.qparser import QueryParser, MultifieldParser, RegexPlugin
 from whoosh.query import Every, Term
 from whoosh.sorting import FieldFacet
 
@@ -578,6 +578,8 @@
             qp = QueryParser(default_fields[0], schema=schema)
         else:
             raise ValueError("default_fields list must at least contain one field name")
+        # TODO before using the RegexPlugin, require a whoosh release that fixes whoosh issues #205 and #206
+        #qp.add_plugin(RegexPlugin())
         return qp
 
     def search(self, q, all_revs=False, **kw):