Manage fields

Once you’ve created a source, you can review the metadata it has extracted from your content. You can then add fields to store the relevant metadata in your Coveo index. Indexed metadata can be used to optimize user experience on your search interfaces.

Fields are data containers where sources index the metadata extracted from your content. Fields can be used to filter search results, create facets, and customize the search experience in various ways.

This article explains how to add fields in your Coveo organization and provides details on field options, origin, and usage. For details on the process of selecting metadata to index, see Index metadata. For more information on mapping management, see Manage mappings.

You can manage your fields from the Fields (platform-ca | platform-eu | platform-au) page, which lists the fields defined in your Coveo organization. This page also displays some options set when creating a field, as well as the field origin, and the number of sources that use each field.

Add a field

Once you’ve created a source, you can add fields to store the metadata it has extracted. Then, you’ll need to add source mappings to ensure that your fields are populated with the desired metadata during the indexing process.

  1. Go to the Add a field subpage. There are two ways to do so:

  2. On the Add a field subpage, enter a name for your field.

  3. Select a type for your field and enable options as needed. See Field options for details.

  4. Click Add field.

  5. Add a source mapping to ensure that your field is populated with the desired metadata during the indexing process.

Field options

This section details the options displayed on the Add a field subpage.

Important

In a Coveo organization, fields are index-wide data containers. In other words, fields may be populated by more than one source. When you modify a field, all the sources that index metadata in this field will be impacted.

Moreover, depending on the changes made to the field options, you may need to rebuild the sources that use the edited field for your changes to be effective. Check the details of each option to see if a rebuild is required. You can launch source rebuilds on the Sources (platform-ca | platform-eu | platform-au) page.

Coveo field options

1

Field type

2

Facet and Multi-value facet

3

Sortable

4

Search operator and Displayable in results

5

Free text search

6

Ranking

7

Stemming

8

Use cache for sort

9

Use cache for computed fields

10

Use cache for nested queries

11

Use cache for numeric queries

Field type

Select the type of data that will be indexed in this field. For a field where you’ll index Boolean metadata, select String.

The possible field types are the following:

Type Field name example Value example

String

department
published

Sales
true

Integer 32

rgbcolor

54,117,136

Integer 64

timesinceepoch

1517341713150

Decimal

weight
length

5.25
3

Date

date

2025-03-27

Vector

personalizationdata

[0.235, 0.1234, 0.789, 0.765]

Integer 32, Integer 64, and Decimal fields are sometimes called numeric fields.

The following are not field types:

Dictionary fields

Dictionary fields are string or numeric fields that can contain multiple key-value pairs. The dictionary capability can be enabled when creating or updating a field via the Field API. See Dictionary fields for more information.

Dynamic fields

Dynamic fields are temporary fields created by a query function to store the value resulting from the calculation. For example, geolocalized search results and discounted prices are operations that require dynamic fields.

Since dynamic fields exist only for the duration of the query execution, they’re not listed on the Fields (platform-ca | platform-eu | platform-au) page, and dynamic isn’t a proper field type.

Facet and Multi-value facet

The Facet and Multi-value facet field options allow you to add a facet based on this field in your search interface. Search interface users will then be able to use this facet to filter their search results by selecting field values. These options are mutually exclusive.

If your field is a string field, you can select either option, or none. With a field of another type, Facet is mandatory and you don’t have have any decision to make.

The main difference between Facet and Multi-value facet is how Coveo interprets the metadata indexed in this field. When you select the Facet option, Coveo interprets the metadata as a single value.

Conversely, when you select the Multi-value facet option, Coveo interprets the metadata as multiple values separated by a semicolon (;).

Example
Author facet | Coveo

You index text documents that may have been edited by several individuals. This means that the author metadata may look as follows: John Smith;Mary Davis;Barbara Allen.

In this case, you should enable the Multi-value facet option for the author field. This ensures that each author name is considered as a separate value in the facet.

In your search interface, when an end user selects names in the Author facet to refine their search results, the items with multiple authors are visible as long as one of their names is selected in the facet.

Conversely, if you were to enable the Facet option instead, Coveo would interpret the indexed metadata as a single value. Therefore, your facet values would look like this: John Smith;Mary Davis;Barbara Allen. Selecting one of these values would filter out any item that doesn’t have exactly this set of values.

Another difference between the two options is that fields with the Facet option enabled can be used to identify items to promote with a featured result rule.

When you select either Facet or Multi-value facet, you have the option to enable the Facet Generator option. This option lets the Facet Generator provide facets based on the input query and the content of your index.

Optionally, enter a name to display when a facet based on this field appears in your search interface. For example, if your field name is sysauthor, you can enter Author as the display name. If you don’t enter a name, the facet will display the field name.

Impact when enabled

Increases the time it takes to index items that populate this field and requires additional index space and memory; enable this option only when necessary. If most indexed items have a different value for your field, loading them in a facet will also increase search response time; enable the Use cache for nested queries option to improve performance.

After changing these options

No rebuild required. However, you may observe a delay before your change becomes effective.

Sortable

The Sortable field option allows you to add a Sort by component based on this field to your search interface. Search interface users will then be able to use this component to sort their search results based on this field.

Using the sort component | Coveo

This option is mandatory for numeric and date fields, and irrelevant for vector fields. So, you don’t have have any decision to make in these cases.

If you expect search interface users to frequently sort their search results based on a certain field, you should enable the Use cache for sort option for this field.

Impact when enabled

Increases the time it takes to index items that populate this field, and requires additional index space and memory. Enable this option only when necessary.

After changing this option

No rebuild required. However, you may observe a delay before your change becomes effective.

Search operator and Displayable in results

At least one of these field options must be enabled.

When Search operator is enabled, search interface users can perform queries on the field. For example, they could type @author=Poe or @author=="Edgar Allan Poe" in the search box to find books whose author is Edgar Allan Poe.

When Displayable in results is enabled, the field can be used in the result templates of your search interfaces. For example, this search result displays the values of the division, title, and location fields:

Coveo search result

Impact when enabled

No significant impact on search response time or index size.

After changing these options

Rebuild all the associated sources to make your change effective.

Typically, when a search interface user enters keywords in the search box, items whose body contains these keywords are returned in the search results. When you enable the Free text search option for a field, the field values are also considered.

Example

You own a bookstore and you index the books you have in your inventory. The body of a book item is its blurb, that is, the description that appears on the back cover. The author field contains the name of the author of the book.

Let’s say a customer types Poe in your search interface.

If the Free text search option is disabled for the author field, the search results will only include books whose blurb include Poe.

If the Free text search option is enabled for the author field, the search results will include books by Edgar Allan Poe, as well as books with Poe in the blurb.

If Free text search is disabled and Search operator is enabled, the field values are only considered in queries that explicitly reference the field, such as @author=Poe.

Impact when enabled

If your fields contain a lot of text, enabling this option could have an impact on performance.

After changing this option

Rebuild all the associated sources to make your change effective.

Ranking

Enable the Ranking option when you want search results whose field value matches the query to be ranked higher in the search results.

Example

You own a bookstore and you index the books you have in your inventory.

Let’s say a customer types Poe in your search interface. If the Ranking option is enabled for the author field, the books whose author is Edgar Allan Poe will be ranked higher in the search results.

Impact when enabled

Significant impact on query performance; enable this option only when necessary.

After changing this option

Rebuild all the associated sources to make your change effective.

Stemming

Enable the Stemming option to allow stemming on field queries.

Example

The words search, searching, and searched share the same root or stem: search-.

Let’s say you enable the Stemming option for the title field. When a user queries searching in item titles (@title=searching), Coveo returns items with a title containing the words searching, search, searches, and searched.

Impact when enabled

Significant impact on query performance; enable this option only when necessary.

After changing this option

Rebuild all the associated sources to make your change effective.

Use cache for sort

The Use cache for sort option makes the search result sorting process faster by keeping the field values in memory. It is available when you’ve enabled the Sortable option for a field.

If you expect search page users to frequently use the sort component based on this field, you should enable the Use cache for sort option.

Impact when enabled

Keeping a sorting field in memory improves the performance of the sort component.

After changing this option

No rebuild required. However, you may observe a delay before your change becomes effective.

Use cache for computed fields

Enable the Use cache for computed fields option when you want to keep data in memory for computed fields. It should be enabled when you have a query function expression that references a field.

For example, you use a query function to compute the file size in kilobytes for each item at query time and store the results in a dynamically generated field called sizekb. This query function is function:"@syssize/1024" : fieldName:"@sizekb". It requires the sizekb field to use the cache.

If the option is not enabled, queries related to these fields may take over a second to return results, depending on your number of items.

After changing this option

Rebuild all the associated sources to make your change effective.

Use cache for nested queries

Cardinality is the number of different values a field has. Cardinality has a great impact on nested query performance, especially with string fields, as Coveo must process many values. Enable the Use cache for nested queries option when using high-cardinality facets, especially if they contain strings, or when you plan on making nested queries using this field. Coveo will keep in memory the values of this field for faster processing.

Impact when enabled

Improves performance of high-cardinality facets and nested queries. Also improves the performance of queries containing advanced search operators and of facet value suggestions.

After changing this option

No rebuild required. However, you may observe a delay before your change becomes effective.

Use cache for numeric queries

Enable the Use cache for numeric queries option when you want to keep the proper information in memory to execute operations on numeric or date fields.

Enabling this option also allows you to use numeric fields for range facets, specify the number of ranges, and let the Coveo index establish the ranges.

Impact when enabled

  • Improves performance when executing queries on numeric fields, especially queries that cover the entire range.

  • This option makes the calculations related to numeric range facets faster, for example when generating the interval values and when dynamically updating these values based on the content returned following a user query.

After changing this option

No rebuild required. However, you may observe a delay before your change becomes effective.

Field origin

On the Fields (platform-ca | platform-eu | platform-au) page, the Origin column indicates the field provenance, and whether it applies to all sources or only to specific sources.

Coveo field origins

Default fields are required by the Coveo index and apply to all sources. They’re automatically created and, for the most part, automatically filled by the Coveo Platform. For example, title, author, and uri are default fields.

When editing Default fields, you can’t change the following options: Search operator, Displayable in results, Free text search, Ranking, and Stemming.

If your organization has default fields with a sys prefix, such as sysdate, see About the SYS field name prefix for more information.

Other fields are added to store specific metadata. They can be either:

Use fields in a search interface

You can use fields in your search interface to filter search results, create facets, and customize the search experience in various ways. These customizations include:

  • Adding facets to a search interface to let users filter their search results by selecting field values. Each facet represents a field in your index and is populated with values found in your content metadata. See Facet and Multi-value facet for more information.

  • Displaying certain field values in search results. This provides additional information about the item to your search interface users. See Displayable in results for more information.

  • Offering the option to sort search results based on the value of a certain field. See Sortable for more information.

  • Implementing result folding. This displays some search results as child items of other search results. See About result folding and Folding results for details.

  • Allowing users to perform advanced queries on fields. This is useful when you know the name of a field and want to retrieve items for which the value of this field matches your entry. See Search operator for details on this option.

Review the activity regarding fields

As part of your duties, you may need to review activities related to fields for investigation or troubleshooting purposes. To do so, in the upper-right corner of the Fields (platform-ca | platform-eu | platform-au) page, click clock.

See Review resource activity for details on activities and alternative ways to access this information.

Required privileges

The following table indicates the privileges required to view or edit elements of the Fields (platform-ca | platform-eu | platform-au) page and associated panels (see Manage privileges and Privilege reference).

Action Service - Domain Required access level

View fields

Content - Fields
Content - Sources
Organization - Activities
Organization - Organization

View

Edit fields

Organization - Activities
Organization - Organization

View

Content - Fields
Content - Sources

Edit

Important

A member with the View access level on the Activities domain can access the Activity Browser. This member can therefore see all activities taking place in the organization, including those from Coveo Administration Console pages that they can’t access.