Available Boolean Field Options

This article presents the Boolean options you can set when creating or editing a field in a Coveo organization.

facet

Whether Group By operations can be performed on this field.

You must set the facet option to true on a STRING type field if you want to use the Coveo JavaScript Search Framework to instantiate a Facet or SimpleFilter component based on that field.

Default values are:

  • false for STRING type fields.

  • true for all other types of fields.

This option can’t be set to false on a non-STRING type field.

includeInQuery

Whether this field can be referred to in Coveo query syntax expressions (for example, @myfield=myvalue).

Several Coveo JavaScript Search Framework components (DistanceResources, Facet, FieldSuggestion, Tab, etc.) rely on the fact that most fields can normally be referred to in advanced query expressions (aq).

Therefore, explicitly setting this option to false on a field isn’t recommended, unless you don’t want that field to be usable in queries at all. When this option is set to false, the field can be used only to sort query results.

Default value is true.

includeInResults

Whether this field can be included in the raw property of each query result.

The Search API lets you explicitly specify which fields you want to include in or exclude from the raw property of each result at query time.

Moreover, the index can include a given field in the raw property of a query result only if this field has a non-null value for this particular result.

Therefore, explicitly setting this option to false on a field isn’t recommended, unless you want to override this behavior and ensure that this field can never be included in the raw property of any query result.

Default value is true.

mergeWithLexicon

Whether the value of this field can make an item match the query.

Example

On a public website, a user submits the Incredible Product basic query expression (q) through a search box

The search box sends an HTTP request to the Search API to run the query against the index of a certain Coveo organization.

In the target organization, the productname field has its mergeWithLexicon option set to true. In the index of that same organization, in a public source, the body of item X has no mention of any of the original query expression keywords.

Assuming that no query pipeline process (such as Coveo Machine Learning) is boosting the ranking of item X, this item would normally not match the query.

However, since the productname field value of item X happens to be Incredible Product the item matches the query.

Default value is false.

This option can only be set to true on a STRING type field.

multiValueFacet

Whether this field contains many values separated by a certain character.

If you set the multiValueFacet option to true when creating a field, you must also specify a value for the multiValueFacetTokenizers option. Typically, you should use ;.

Default value is false.

This option can’t be set to true on a non-STRING type field.

multiValueFacetTokenizers

The character to use as a value separator, if the field contains many values.

Typically, you should set this option to ;.

While it’s possible to use this option to specify any custom character to use as a value separator (for example, ,), doing so isn’t recommended because the Coveo JavaScript Search Framework won’t parse these values correctly.

Default value is null.

This option must be specified if multiValueFacet is true.

ranking

Whether to use this field in result ranking calculations.

Setting this option to true on many fields can have an adverse effect on query performance.

Default value is false.

This option can only be set to true on a STRING type field.

smartDateFacet

Whether to transform incoming date and time string values into semicolon-separated numbers of days/weeks/months/quarters/years elapsed since January 1st, 1900.

If you set this option to true on a DATE type field, the field itself will be populated by the number of milliseconds since Unix epoch corresponding to the parsed date and time string, as usual.

However, the index will also automatically create a new field, and populate it with the smart date data.

Example

You create the mydate field in your index and set the smartDateFacet option to true on that field.

The index processes a source item whose mydate metadata value is 2017-11-20T19:58:55.126Z. The mydate metadata is mapped to the mydate field in that source.

The index populates the mydate field with the corresponding number of milliseconds since Unix epoch (that is, 1511207935000). It also creates a mydatesmartfacet field and populates it with the smart date data (that is, D43057;W6151;M1414;Q471;Y117).

Default value is false.

This option can only be set to true on a DATE type field.

sort

Whether query results can be sorted based on this field.

Having lots of sortable STRING type fields in a Coveo organization can have an adverse effect on its index size and performance.

Therefore, explicitly setting this option to true on a STRING type field isn’t recommended, unless you’re certain that this feature will be useful for that field (for example, if you’re planning to use the field as a sortCriteria in the Sort component of a search page made with the Coveo JavaScript Search Framework).

Default values are:

  • false for STRING type fields.

  • true for all other types of fields.

This option can’t be set to false on a non-STRING type field.

stemming

Whether to allow stemming on field queries. This option isn’t selected by default since the option has a significant impact on query performance.

Setting this option to true on many fields can have an adverse effect on query performance.

Default value is false.

This option can only be set to true on a STRING type field.

system

Whether this field is a standard Coveo field.

Leave this option set to false when creating a new field.

Default value is false.

useCacheForComputedFacet

Whether to read computed field results involving this field from the cache.

Setting this option to true on a field can greatly speed up query function expressions referencing this field.

Default value is false.

This option can’t be set to true on a STRING type field.

useCacheForNestedQuery

Whether to store and read nested query results involving this field in cache.

Setting this option to true on a field also speeds query performance for expressions that compare the value of this field using regex, wildcard, phonetic match, or fuzzy match query operators.

Default value is false.

This option can be set to true on a STRING type field when the facet option or the multiValueFacet option is also true for that field.

useCacheForNumericQuery

Whether to store and read numeric operation results involving this field in cache.

Default value is false.

This option can’t be set to true on a STRING type field.

useCacheForSort

Whether to store and read this entire field in cache to allow faster sorting.

Default value is false.

This option can’t be set to true on a STRING type field, unless the sort option is also true for that field.