[Zope-CMF] get empty list from Contributors in search
results
Grégoire Weber
gregoire.weber@switzerland.org
Thu, 23 Aug 2001 09:18:01 +0200
Hi Tres,
(forgot the list first)
first of all: it works! Thanks!
Second: Zope is really a wonderful tool! (CMF also!!!)
> An important gotcha here: you are iterating over the "brains"
> objects returned from a catalog query, rather than over the content
> objects themselves. "Brains" objects know only about the "cached"
> metadata in the catalog; you must call 'getobject' on them (and
> take the rather large performance penalty) to get access to non-cached
> attributes.
Aha, it seems as I have to have a look at this once ... I followed the
discussion last year (?) but didn't understand entirely.
It works if I fetch the Contributors by <dtml-var
"getObject().Contributors()">
(instead of <dtml-var Contributors>).
How serious is the performance penalty?
> Add the 'Contributors' column on the "Schema" tab of your catalog,
> update the catalog, and try again.
I didn't find the "Schema" tab but I added Contributors as Field
Index at the "Indexes" tab and additionally in the "Metadata"
tab (Information just for people on the list).
Just for curiosity:
Is my understanding correct that an index is much the same as the
alphabetical index at the end of a book (a list of words and the
reference to the page/object (book/catalog) where the word occures)
and that in metadata the content of property is saved/cached?
So by adding a property to the index I make it (the property)
searchable and by adding it to metadata I make it fetchable
directly from the catalog.
Correct?
Greg
_____________________________________
Grégoire Weber
Rigistr. 31
CH-8006 Zürich
Switzerland
phone: +41-(0)1-361 66 11
mobile: +41-(0)79-44 11 457
mailto:gregoire.weber@switzerland.org