CatalogAware when there's no 'Catalog'
Hi everyone, It seems like it's not possible to create a CatalogAware ZClass that automatically catalogs itself in anything other than a ZCatalog named 'Catalog'. Is that the case? Does a rule of thumb exist to help decide when you should us a 'Catalog' in your Zope's root folder and when it would be better to use a custom 'FooCatalog' in a subfolder somewhere for specific purposes. For example, I've created a catalogaware ZClass to store breakfast and lunch menus for our schools. I'd like to query a ZCatalog somewhere to pull out a menu for a certain day or a range of days. Would it promote catalog-bloat (if such a thing exists) to store those in the root 'Catalog' with all of the resulting indexes and meta data? -Tim -- Tim Wilson | Visit Sibley online: | Check out: Henry Sibley HS | http://www.isd197.k12.mn.us/ | http://www.zope.org/ W. St. Paul, MN | | http://slashdot.org/ wilson@visi.com | <dtml-var pithy_quote> | http://linux.com/
Yes, catalog aware looks for an object called Catalog. No choice there (unless you hack Zope). Unless you are looking at huge numbers (say 10,000+) you shouldnt notice much perfomance difference by using catalog, so if it makes your life easier just use one. -- Zopista ----- Original Message ----- From: "Timothy Wilson" <wilson@visi.com> To: "Zope listserv" <zope@zope.org> Sent: Tuesday, April 17, 2001 8:11 PM Subject: [Zope] CatalogAware when there's no 'Catalog'
Hi everyone,
It seems like it's not possible to create a CatalogAware ZClass that automatically catalogs itself in anything other than a ZCatalog named 'Catalog'. Is that the case?
Does a rule of thumb exist to help decide when you should us a 'Catalog' in your Zope's root folder and when it would be better to use a custom 'FooCatalog' in a subfolder somewhere for specific purposes. For example, I've created a catalogaware ZClass to store breakfast and lunch menus for our schools. I'd like to query a ZCatalog somewhere to pull out a menu for a certain day or a range of days. Would it promote catalog-bloat (if such a thing exists) to store those in the root 'Catalog' with all of the resulting indexes and meta data?
-Tim
-- Tim Wilson | Visit Sibley online: | Check out: Henry Sibley HS | http://www.isd197.k12.mn.us/ | http://www.zope.org/ W. St. Paul, MN | | http://slashdot.org/ wilson@visi.com | <dtml-var pithy_quote> | http://linux.com/
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
On Wednesday 18 April 2001 11:22, Zopista wrote:
Yes, catalog aware looks for an object called Catalog. No choice there (unless you hack Zope).
Unless you are looking at huge numbers (say 10,000+) you shouldnt notice much perfomance difference by using catalog, so if it makes your life easier just use one.
i may be wrong but we can have a nondefault catalog named whatever we want. if we have a CatalogAware ZClass, we can tell it to reindex the right catalog by including <dtml-call "manage_editCataloger('your_unique_catalog)"> <dtml-call "reindex_object"> between the <dtml-with>..</dtml-with> in the zclass constructor http://www.zope.org/Members/kedai/BuildSimpleZClass is a culmination of many howtos.
-- Zopista
Hi Tim, On 2001.04.18 05:11 Timothy Wilson wrote:
It seems like it's not possible to create a CatalogAware ZClass that automatically catalogs itself in anything other than a ZCatalog named 'Catalog'. Is that the case?
Not quite. Have a look at the 'Build a simple ZClass HowTo' at http://www.zope.org/Members/kedai/BuildSimpleZClass, which shows a good concept of using custom catalogs for catalog aware ZClasses. Cheers, Ben -- Ben Peter - Feldstrasse 8 - 35091 Coelbe Ben.Peter@t-online.de ph: (+49) 6421 983520
participants (4)
-
bak -
Ben.Peter@t-online.de -
Timothy Wilson -
Zopista