Hi,

You can put indexes and metadata (columns that end up in the brains)
into the portal catalog.  It is customary to do this with Archetypes.
But it can also be done with GenericSetup.  Doing the same thing twice
does not sound like a good idea.  So I wondered what is the best way now.


Archetypes
----------

With archetypes you can add an index for a field in your schema, e.g.:

     index="FieldIndex"

Or you can add that field to the index *and* to the metadata:

     index="FieldIndex:brains"

I do not think it is possible to add a field *only* to the metadata
with Archetypes, so not in the Index as well.  Am I correct here?


GenericSetup
------------

With GenericSetup you can add an index in profiles/default/catalog.xml:

 <index name="getHours" meta_type="FieldIndex">
  <indexed_attr value="getHours"/>

and you can add a column to the metadata:

 <column value="getHours"/>


Of course when you are aiming for compatibility with Plone 2.1 you
should just use the Archetypes way.

But for Plone 2.5 or 3.0, I wonder if it is better to rely on
GenericSetup only.

What do you think?

-- 
Maurits van Rees | http://maurits.vanrees.org/ [NL]
            Work | http://zestsoftware.nl/
"Do not worry about your difficulties in computers,
 I can assure you mine are still greater."


_______________________________________________
Product-Developers mailing list
[email protected]
http://lists.plone.org/mailman/listinfo/product-developers

Reply via email to