[Zope] ZCatalog Search Q

Chris Withers chrisw@nipltd.com
Fri, 30 Jun 2000 12:09:47 +0100


Leonard Chan wrote:
> I'd like to include some attributes from the actual objects
> (maybe by accessing the actual object via id, etc?) in the
> result list.

You can get the actual object with:

Catalog.getobject(data_record_id_) inside your dtml-in loop.

This is supposedly a 'bad' thing to do but there's nothing better right
now...

>  I can of course include those attributes in the catalogue meta table so they  would be returned with the search results, but I don't really
> want to do that unless there is no other way.

Well, it might be the best way. Why?

...because otherwise you have to load up the whole object to get the
attributes you want. If there's only a few attributes like this, which
are small anyway, and your objects are large, then your wastign a load
of RAM you don't need to be.

HTH,

cheers,

Chris