[Zope-CVS] CVS: Products/ZCTextIndex - Lexicon.py:1.11
Guido van Rossum
guido@python.org
Tue, 21 May 2002 07:42:13 -0400
Update of /cvs-repository/Products/ZCTextIndex
In directory cvs.zope.org:/tmp/cvs-serv28946
Modified Files:
Lexicon.py
Log Message:
globToWordIds() shouldn't make assumptions about the pipeline. It
still only supports a trailing *, so the pipeline should honor that;
added a comment to the Splitter class referring to globToWordIds().
=== Products/ZCTextIndex/Lexicon.py 1.10 => 1.11 ===
def globToWordIds(self, pattern):
- if not re.match("^\w+\*$", pattern):
- return []
- pattern = pattern.lower()
+ # This currently only knows about trailing *;
+ # whatever splitter you use should match this
assert pattern.endswith("*")
prefix = pattern[:-1]
assert prefix and not prefix.endswith("*")
@@ -128,7 +127,7 @@
import re
rx = re.compile(r"\w+")
- rxGlob = re.compile(r"\w+\*?")
+ rxGlob = re.compile(r"\w+\*?") # See globToWordIds() above
def process(self, lst):
result = []