Leonard Chan wrote:
> > This is supposedly a 'bad' thing to do but there's nothing better right now...
> Why is this a 'bad' thing?  'Cause it requires loading the whole object?

Nope, 'cos it doesn't work with anything that plays with traversal, like
SiteAccess. Something better should be coming along in Zope 2.2 but it
probably won't be documented until Zope 3 :(

> Yes. Our situation is like this.  We have a bunch of objects (ZClass) in
> various folders, and we would like to provide a dynamic search facility
> for the users (in addition to traversing folders and sub-folders, which
> is not a problem).
> The object has a description field, which is a few lines of text (there
> is a long description field, which varies from zero length to up to 10
> times the size of the desc).
> We need to display the description field (but not the long desc) on the
> search results, so to implement this, we can either stick the desc in
> the catalog meta-table, or use getobject as you suggested to retrieve
> the object (and hence the required attributes).
> Initially, I'm a bit worried about sticking the desc in the meta-table
> 'cause it's relatively big compared to the other attributes.  Maybe it's
> still cheaper than getting the object (which includes the much bigger
> long desc field) every time?  Seen similar situation before?  Any help
> is appreciated.

Well, given that it's going to be easier and cleaner for you to put it
in the metadata table I'd d othat. I can really see any problems with

I'm sure someone else on the list will comment if they know better...



Zope maillist  -  [EMAIL PROTECTED]
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-dev )

Reply via email to