[Zope3-checkins] CVS: Zope3/src/zope/app/catalog - catalog.py:1.5

Anthony Baxter anthony@interlink.com.au
Sun, 13 Jul 2003 04:23:42 -0400


Update of /cvs-repository/Zope3/src/zope/app/catalog
In directory cvs.zope.org:/tmp/cvs-serv16578/app/catalog

Modified Files:
	catalog.py 
Log Message:
Hooked up full text indexing. There's a new interface ISimpleQuery that 
accepts a term and returns a list of hubids. A simple adapter is installed
to adapt textindex to this interface. FieldIndex actually implements this
interface, rather than IQuerying (oops).


=== Zope3/src/zope/app/catalog/catalog.py 1.4 => 1.5 ===
--- Zope3/src/zope/app/catalog/catalog.py:1.4	Sun Jul 13 01:53:57 2003
+++ Zope3/src/zope/app/catalog/catalog.py	Sun Jul 13 04:23:08 2003
@@ -14,7 +14,7 @@
 
 from zope.app.interfaces.container import IDeleteNotifiable, IAddNotifiable
 from zope.app.interfaces.container import IContainer
-from zope.index.interfaces.index import IQuerying
+from zope.index.interfaces.index import ISimpleQuery
 
 from zope.app.container.sample import SampleContainer
 
@@ -37,6 +37,7 @@
         return len(self.hubidset)
 
     def __iter__(self):
+        print self.hubidset, type(self.hubidset)
         for hubid in self.hubidset:
             obj = self.hub.getObject(hubid)
             yield obj
@@ -128,7 +129,7 @@
             index = wrapped_self.get(key)
             if not index: 
                 raise ValueError, "no such index %s"%(key)
-            index = getAdapter(index, IQuerying)
+            index = getAdapter(index, ISimpleQuery)
             results = index.query(value)
             if pendingResults is None:
                 pendingResults = results
@@ -145,3 +146,4 @@
 
 class CatalogUtility(Catalog):
     implements (ILocalUtility)
+