[Zope-Checkins] CVS: Zope/lib/python/Products/PluginIndexes/TextIndexNG - TextIndexNG.py:1.2.2.26

Andreas Jung andreas@digicool.com
Sun, 10 Feb 2002 11:50:57 -0500


Update of /cvs-repository/Zope/lib/python/Products/PluginIndexes/TextIndexNG
In directory cvs.zope.org:/tmp/cvs-serv15573

Modified Files:
      Tag: ajung-textindexng-branch
	TextIndexNG.py 
Log Message:
enabled globbing did not return the wrong docIds


=== Zope/lib/python/Products/PluginIndexes/TextIndexNG/TextIndexNG.py 1.2.2.25 => 1.2.2.26 ===
 
         # Retrieve list of docIds for that wordId 
-        # XXX: internal storage only !
-        
-        # docIds is an IOBTree and contains the mapping
-        # (documentId, list of positions) for one word/wid
+        # docIds is an IISet() of all matching documentIds
 
-        if len(wids) > 0:
-            docIds = self._IDX.get(wids[0])
-        else:
-            docIds = IISet()
+        docIds = IISet()
 
-#        debug('\tDocIds: ', list(docIds.keys()))
+        for wid in wids:
+            docIds.update( self._IDX.get(wid) )
+
+        debug('\tDocIds: ', list(docIds.keys()))
 #        debug('\tPositions: ', list(docIds.values()))
 
         r = ResultSet( docIds, (word,))