[Zope] how to search entire site from a sub dir?

Dieter Maurer dieter at handshake.de
Fri Sep 19 14:52:20 EDT 2003


Jianping Zhu wrote at 2003-9-18 16:22 -0400:
 > On Thu, Sep 18, 2003 at 10:32:12AM +0200, Tino Wildenhain wrote:
 > ...
 > > You should of course create the ZCatalog in root and not in a distant
 > > leafe.
 > > Its possible, but then you have to catalog all objects yourself rather
 > > then letting ZCatalog do this for you. (ZCatalog uses ZopeFind()
 > > for descending all folders and objects when you hit catalog items)
 > ...
 > But for some reason i only have write access to mydev, what do you mean
 > by catalog all objects by myself?

All objects have methods which perform actions for the user.
Often, there are low and high level methods.

The "ZCatalog" provides a high level method for cataloguing
that gets a query specification, searches in its containing container
all objects satisfying the specification and catalogs them.

The "ZCatalog" also provides a low level method for cataloguing:
"catalog_object". It catalogs any object, you provide.

To use "catalog_object", you have to collect all objects you
want to catalog and call "catalog_object" for them.
You can use "ZopeFind" to collect the objects.
This is what Tino meant by "catalog yourself".


I recommend my "DocFinder" product to find out easily what
methods are available and how they should be called.

  <http://www.dieter.handshake.de/pyprojects/zope>



Dieter



More information about the Zope mailing list