Index fields configuration

A field configuartion is a collection of field items defining which contents are stored in an index and how they are stored there.

<field name="..." display="..." store="..." index="..." boost="..." excerpt="..." default="..." >
<mapping type="...">...</mapping>

Configuration nodes

  • the <name> node gives the field configuration a unique name.
  • the <description> node contains optionally a further explanation
  • each <field> node specifies a single field in the lucene search index, and how the content mapped to that field is stored:
    • name: the name of the field
    • display (optional): the "nice" display name of the field
    • store (true|false): defines if the value is stored in the index, or only the reverse references for searching
    • index (true|false|untokenized): defines if the value is used for searching and if the value is processed with the analyzer or not (untokenized)
    • boost (optional): the boost factor for weighting the hits in the field
    • excerpt (optional): the excerpt build for the hits in the field
    • default (optional): a default value
  • for each field, there are one or more <mapping> nodes specifying where to get the contents for the field. All contents provided by the mappings are appended.
    The type attribute defines what type of content is specified by the name provided in the body of the mapping tag:
    • content: the full content of a resource, a name is not used
    • property: the name denotes a property of the resource, directly set at the resource
    • property-search: the name denotes a property of the resource, which might have been set at a parent folder
    • item: the name denotes an element in an xml page or content


This example shows the standard definition for the "content" and "title" key:

<description>The standard OpenCms 7.0 search index field configuration.</description>
<field name="content" display="%(key.field.content)" store="true" index="true" excerpt="true">
<mapping type="content"/>
<field name="title" display="%(key.field.title)" store="false" index="true">
<mapping type="property">Title</mapping>