[Zope] Zcatalog: indexing on list attributes?

Eric Casteleijn eric@codenamefuture.nl
Mon, 26 Mar 2001 14:10:56 +0200


I've searched the archives and zope.org, but I can't find the answer tho
this problem (i think this is partly because it's hard to express it in a
few search-terms.) :

I have a ZClass (subclassed from ZCatalogAware) with some properties. The
properties are indexed in a catalog and the indexing works fine for most of
them. One of the properties however is a multiple selction listbox, and this
means that the property-type is a list. The ZCatalog doesn't seem to like
this. It will not report any errors, but any searches in which the property
is involved deliver a result set that is way too small. (I suspect that only
those records are returned for which the multiple selection is empty.) Now
as it turns out, the multiple selection itself was unnecessary as 99% of the
records will have only a single value in the field. My question therefore is
twofold: Is this behaviour expected and am i too green to get how to index
the list property (i suspect this is it,) or is it a bug? In the unlikely
latter case, is there a way to change the type of the property without
losing the data? (I'm not using an external datasource yet, as this is just
a prototype site, but the dataset is large enough that i don't want to enter
it again.)

TIA,
eric casteleijn