[Zope-Checkins] CVS: Zope/lib/python/Products/PluginIndexes/TextIndexNG/queryparser - Collector.py:1.1.2.4
Andreas Jung
andreas@digicool.com
Sat, 23 Feb 2002 20:31:43 -0500
Update of /cvs-repository/Zope/lib/python/Products/PluginIndexes/TextIndexNG/queryparser
In directory cvs.zope.org:/tmp/cvs-serv2706
Modified Files:
Tag: ajung-textindexng-branch
Collector.py
Log Message:
added support for similarity search
=== Zope/lib/python/Products/PluginIndexes/TextIndexNG/queryparser/Collector.py 1.1.2.3 => 1.1.2.4 ===
__repr__ = __str__
+class ProximityWord(Word):
+
+ def __str__(self): return "PL('%s')" % self.word
+ __repr__ = __str__
+
class Parens:
def __init__(self, p):
@@ -62,11 +67,12 @@
self.default_op = default_op
- def addWord(self,word): self.push( Word(word) )
- def addOp(self, op): self.push( Operator(op) )
+ def addWord(self,word): self.push( Word(word) )
+ def addProximityWord(self,word): self.push( ProximityWord(word) )
+ def addOp(self, op): self.push( Operator(op) )
- def addOpenParens(self, p): self.push( Parens(p) )
- def addCloseParens(self, p): self.grabStack()
+ def addOpenParens(self, p): self.push( Parens(p) )
+ def addCloseParens(self, p): self.grabStack()
def grabStack(self):