[Zope-dev] Catalog result brains not extendable
Jay, Dylan
djay@avaya.com
Mon, 30 Jul 2001 10:14:06 +1000
> -----Original Message-----
> From: Chris Withers [mailto:chrisw@nipltd.com]
> Sent: Sunday, 29 July 2001 10:21 PM
> To: Jay, Dylan
> Cc: 'zope-dev@zope.org'
> Subject: Re: [Zope-dev] Catalog result brains not extendable
>
>
> "Jay, Dylan" wrote:
> >
> > I'm trying to get some results from a catalog and add
> meta_data to it.
>
> What is this meta_data?
>
> What I'd do is add a meta_data column to the catalog with the
> name of your
> required data.
> Then add a script of the same name somewhere that it can be
> acquired by all the
> objects you want to index.
> This script should then calculate the value for the metadata
> as appropriate,
> using the 'context' object to get hold of the object being indexed.
No I need to combine the data at search time. This is due to the fact that
the meta_data is user specific. Every user will have their own set of data
for most items in the catalog. I want to join an arbitrary query of the
catalog with the user specific data to have a search with personalized
information.
My problem is that under normal circumstances python objects can be extended
by adding attributes to them. Why can't I do that under zope? or why isn't
the results of a catalog search a list of dictionarys rather than a list of
objects?