Understanding Fields

A field is an index-wide data container that holds specific information about each individual item whose corresponding source mappings include rules to populate this field.

Each Coveo Cloud organization source automatically comes with a set of standard system fields populated from standard metadata. You can also create fields that are filled with the content or metadata of your choice when adding mappings for sources (see Add or Edit Fields). Fields can be leveraged in a search interface to optimize the global search experience.

  • In the Coveo Cloud documentation, field names are preceded by an @ character.

  • Some fields such as @author and @title may have inaccurate values when, for example, authors create a document from a template and omit to change the template metadata values.

    An indexed item does not have a title associated with it. The @title field is thus automatically populated with the item’s URL since the author did not provide a title.

Field Origins

On the Fields page, the Origin column indicates the field type (Default or Other). There are three possible origins to Coveo fields:

Field Types

There are five possible field types:

  • String

    The value of the @department field is Sales.

    The String type is also used for Boolean metadata.

    The value of the @published field is true.

  • Integer 32

    The value of the @rgbcolor field is 54,117,136.

  • Integer 64

    The value of the @timesinceepoch field is 1517341713150.

  • Decimal

    The value of the @weight field is 5.25. The value of the length field is 3.

  • Date

    The value of the @date field is 2018-01-30.

Field Uses

You can leverage fields in several parts of Coveo Cloud.

  • Facets in a search result page are based on field values (see Understanding Facets). Search page users can filter their search results by selecting only the desired values for a facet field.

  • You can configure your search page interface so that search results display certain field values (see Configuring JavaScript Search Result Templates). This provides additional information on the item to your search page users.

    Your company uses Coveo Cloud to search for text documents. When configuring your search result template, you choose to display the @source and @author field values. This makes it easier for your search page users to determine the item origin.

  • You can configure your search page interface so that it offers the option to sort search results based on the value of a certain field (see JavaScript Search Interface Editor).

    Your company uses Coveo Cloud to search for engine parts and maintenance manuals. When configuring your search page interface, you choose to offer the following sorting options to your users:

    • Sorting results by date the item was entered in your system (@date field)
    • Sorting results by part weight (@weight field)
    • Sorting results by file size (@size field)
  • You can configure your search page interface to implement result folding, i.e., so that some search results are displayed as child items of another search result (see Understanding Result Folding and Result Folding Tutorial).

  • When you know the name of a field, you can make advanced field queries to retrieve items for which this field value matches your entry (see Advanced Field Queries).

Multi-Value Fields

A multi-value field is a field to which multiple string values are associated. Multi-value fields are also supported in facets (see Understanding Facets).

  • An item contains English text and its Spanish translation. The @language field values for this item are therefore English and Spanish.

  • John Smith creates an item, and then his coworker Barbara Allen edits it. Both are therefore marked as authors of this document. The @author field values for this item are therefore John Smith and Barbara Allen.

  • John Smith sends an email to Barbara Allen, with a copy to Mary Davis and Lisa Brown. The @to field is therefore not a multi-value field in this case, but it could be. The @cc field, however, is and contains Mary Davis and Lisa Brown as values.

  • When creating a field, select the Multi-value facet option to declare that this field is susceptible to contain multiple values and ensure that all values are considered as separate facet options (see Multi-value facet - Multi-Value Fields In Facets and Understanding Facets). If you do not select this option, the multiple field values appear as a single large value (e.g., value1;value2;value3) and are displayed as such in a facet.

  • Multi-value fields only support string values.

Dynamic Fields

A dynamic field is temporarily created by a query function (see Query Function). It contains a value resulting from the query function calculation. Dynamic fields are not listed in the Fields administration console page, since they only exist within the operations in which a query consists.

Geolocalized search results and discounted prices are typical examples of operations requiring a dynamic field (see Geolocalized Results and Discounted Price).