Hey Maurits,

> 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?

IIRC, you can use something like:

     index=":brains"

> 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?

/me will continue to use the AT approach when possible (e.g. when
an AT schema is available) and the GS approach when it's not...

HTH,

-- 
 ___________________________________________________________________

       Dorneles Treméa · Developer · Plone Solutions · Brazil

   Consulting · Training · Development · http://plonesolutions.com
 ___________________________________________________________________

  Plone Foundation · http://plone.org/foundation · Protecting Plone


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

Reply via email to