Part of creating a custom metadata field involves defining the following settings:
- The search index and how the value of the metadata field should be stored in the search index (compass settings)
- Which values are displayed and whether or not they are editable (data settings)
- How the metadata field is displayed in the client (userInterface settings)
<field name="cf_customField" group="My Group">
<storage storeInMetadata="true" />
<compass index="tokenized" analyzer="pureLowerCase" store="yes" excludeFromAll="false" />
<data editable="true" datatype="text" >
<predefinedValues onlyFromList="true">
<value>Product A</value>
<value>Product B</value>
<value>Product C</value>
</predefinedValues>
</data>
<userInterface filterUI="checkBoxes" filterValuesSource="usedTerms" />
</field>
Note: For a detailed explanation of these settings, see The metadata structure of Elvis 5.
Obviously, various combinations of these settings are possible, many of which are already applied to default metadata fields in Elvis.
Instead of figuring out yourself which of these settings would work best for your custom metadata field, you can use any of the predefined compass settings shown below. We have found that these settings work best for the listed field types.
Long text
Example fields: description, caption.
<compass store="yes" index="tokenized" excludeFromAll="false" />
Sentence of text
Example field: deadline.
<compass store="yes" index="tokenized" excludeFromAll="false" />
Person or company name
Example fields: assetCreator, assetModifier, sceCreator, captionWriter.
<compass store="yes" index="tokenized" excludeFromAll="false" />
Location fields
Example fields: generalSublocation, generalCity, creationRegion, shownWorldRegion.
<compass store="yes" index="tokenized" excludeFromAll="false" />
Title or non-person name
Example fields: scePublication, title, subjectEvent, publicationName.
<compass store="yes" index="tokenized" analyzer="pureLowerCase" excludeFromAll="false" analyzerForAll="default" />
URLs
Example fields: sourceUrl, url.
<compass store="yes" index="tokenized" analyzer="pureLowerCase" excludeFromAll="false" analyzerForAll="default" />
E-mail addresses
Example fields: creatorEmail, licensorEmail.
<compass store="yes" index="tokenized" analyzer="pureLowerCase" excludeFromAll="false" analyzerForAll="default" />
Category
Example fields: category, supplementalCategory, publicationChannel, section.
<compass store="yes" index="tokenized" analyzer="pureLowerCase" excludeFromAll="false" analyzerForAll="default" />
<userInterface filterUI="checkBoxes" filterValuesSource="usedTerms" />
Category (multivalue)
Example field: ocTopic.
<compass store="yes" index="tokenized" analyzer="pureLowerCase" excludeFromAll="false" analyzerForAll="default" />
<userInterface filterUI="tagCloud" filterValuesSource="usedTerms" />
Postal code
Example fields: creatorPostalcode, licensorPostalcode.
<compass index="tokenized" analyzer="pureLowerCase" store="yes" excludeFromAll="true" />
Phone number
Example fields: creatorPhone, licensorPhone.
<compass index="un_tokenized" store="yes" excludeFromAll="true" />
Unique code or identifier
Example fields: originalTransmissionReference.
<compass index="un_tokenized" store="yes" excludeFromAll="false" />
Boolean field
Example field: public, doNotCleanup.
<compass index="tokenized" analyzer="pureLowerCase" store="yes" excludeFromAll="true"/>
<data editable="true" datatype="text">
<predefinedValues onlyFromList="true">
<value></value>
<value>True</value>
</predefinedValues>
</data>
Decimal
<compass index="un_tokenized" store="yes" excludeFromAll="true" />
<data datatype="decimal" />
Number
<compass index="un_tokenized" store="yes" excludeFromAll="true" />
<data datatype="number" />
Datetime
<compass index="un_tokenized" store="yes" excludeFromAll="true" />
<data datatype="datetime" />
Document History
- 22 March 2018: Added examples for decimal, number and datetime.
Comment
Do you have corrections or additional information about this article? Leave a comment! Do you have a question about what is described in this article? Please contact Support.
4 comments
Maybe add an example of a decimal field.
Hi Rogier,
Thanks for your suggestion.
Examples for decimal, number and datetime have now been added.
Best regards,
Maarten van Kleinwee
Senior Technical Writer, WoodWing Software
I'm looking for a definition of "editable=false" or "editable=true", but I cannot find it anywhere. Could someone please define it, or point me to a definition? I think editable=false may mean that some processes can edit the field, but not interactive users, but I'd like to be certain and know exactly what the limitations and possibilities are.
Hello Siebrand,
The editable=false prevents assigning edit permission on a metadata field to user accounts. On top of that they are explicitly blocked in the UI from being editable.
However users with ROLE_SUPERUSER assigned (admins) are able to edit these fields through the API.
Please sign in to leave a comment.