[Zope] zcatalog always catalogs whole site when using 'Find'
tab.
Michel Pelletier
michel@digicool.com
Wed, 30 Jun 1999 10:28:14 -0400
> -----Original Message-----
> From: Anthony Baxter [mailto:anthony@interlink.com.au]
> Sent: Wednesday, June 30, 1999 1:11 AM
> To: zope@zope.org
> Subject: [Zope] zcatalog always catalogs whole site when using 'Find'
> tab.
>
>
> first off, the ZCatalog tutorial has a chunk that includes
> example HTML,
> without quoting it - search for 'Replace it with this:', it's the line
> before and the line after.
>
> next thing - if I add a ZCatalog to a subfolder, and do a 'find into
> catalog', the search will start at the top of the Zope tree.
> This seems
> unintuitive to me - it should only do the find from the folder object
> containing the ZCatalog. (This is more in keeping with the
> behaviour of the
> existing 'Find' tab)
>
> the following will change ZCatalog to have this behaviour:
>
> --- ZCatalog.py Wed Jun 30 15:00:23 1999
> +++ ZCatalog.py.orig Wed Jun 30 14:56:10 1999
> @@ -248,11 +248,11 @@
> obj_permission=None):
>
> """ Find object according to search criteria and Catalog them
> """
>
> - results = self.ZopeFind(REQUEST.PARENTS[1],
> + results = self.ZopeFind(REQUEST.PARENTS[-1],
> obj_metatypes=obj_metatypes,
> obj_ids=obj_ids,
> obj_searchterm=obj_searchterm,
> obj_expr=obj_expr,
> obj_mtime=obj_mtime,
>
> Does this seem reasonable? Or should it be a checkbox in the 'Find'
> page to specify whether to search the entire site?
>
You are correct, and it's fixed in the latest CVS. Thanks for the tip.
On another catalog Note, for those of you who are keeping up with the
development of the Catalog in CVS, you must make sure that you update
your Zope as well. For example, to keep the Catalog's memory
consumption resonable, it uses the shiny new sub-transactions. To use
subtransactions, you must have the latest CPickleCache and
ExtensionClass compiled in your Zope.
-Michel
> Anthony
>
> _______________________________________________
> Zope maillist - Zope@zope.org
> http://www.zope.org/mailman/listinfo/zope
>
> (For developer-specific issues, use the companion list,
> zope-dev@zope.org - http://www.zope.org/mailman/listinfo/zope-dev )
>