Add/Edit a Field: [FieldName] - Panel

When you have the required privileges, you can add and edit fields (see Understanding Fields).

  1. If not already in the Add/Edit a Field [FieldName] panel, go to the panel:

    • To add a field, in the main menu, under Content, select Fields > Add Field button.

      OR

    • To edit a field, in the main menu, under Content, select Fields > field row > Edit in the Action bar.

  2. When adding a new field, in the Filter name box, enter a required descriptive name for the field.

    The field Name value is not editable once added and can only contain lowercase letters (a-z), numbers (0-9), and underscores.

    Spaces and other special characters are not allowed.

  3. When adding a new field, in the Type drop-down menu, select one of the following field types: String, Integer 32, Integer 64, Decimal or Date (see Field Types).

    • For a Boolean metadata, select a String type. The value will be either true or false.

    • The field Type is not editable once the field has been added.

  4. (Optional) In the Description box, enter information such as the creation date of the field or the value (metadata) that you want to be populated for this field.

    The date on which the item was first added to the index

  5. If you selected String at step 3, optionally select uses for your field.

    When editing a field, if you change the following parameters, all sources using this field must be rebuilt (see Refresh, Rescan or Rebuild Sources).

    • Facet

      When you select the Facet option for a field, you can later add a facet based on this field in your search page, thus allowing your search page users to further filter the results by selecting or excluding field values (see Adding Facets to a Search Page Using the Interface Editor and Understanding Facets).

      In your content metadata, the values of the @author field are author names such as John Smith, Mary Davis, Christopher Todd, etc. You select the Facet option so that you can put an Author facet in your search page. With such a facet, search page users can narrow down their search results to only those authored by the selected people.

      Search-FacetOR

      • Numeric (Integer 32, Integer 64, and Decimal) and Date fields are facetable by default.

      • Select only when necessary to minimize unnecessary groupby processing.

    • Multi-value facet (see Multi-Value Fields In Facets)

      If not selected, field values appear as one occurrence of semicolon separated values (ex.: value1;value2;value3).

    • Sortable

      • Numeric (Integer 32, Integer 64, and Decimal) and Date fields are sortable by default.

      • Select only when you really use this field to sort results with a sort component in a search interface since adding sorting fields can have an impact on index size and indexing performance.

  6. Optionally, click Advanced Settings to access more options, and then choose between one or more of the following additional options:

    • Some settings are not always editable, depending on the field origin (see Sort Fields by Origin). When editing Default fields, you cannot change the following settings: Search operator, Displayable in results, Free text search, Ranking, and Stemming.

      Moreover, some settings are not always editable, depending on the field type (see Available Options Per Field Type).

    • When editing a field, if you change the following parameters, all sources using this field must be rebuilt (see Refresh, Rescan or Rebuild Sources).

    • Search Operator

      Whether end-users can perform field queries on this field in the search box (ex.: @date=today). Selected by default since there is no meaningful cost to select this option for all fields.

    • Displayable in results

      Whether to add the field to a search result template (so it appears as an element of a search result). Selected by default since the option must be selected to see the field in the Content Browser (see Content Browser - Page).

      • Selecting this option for all fields takes minimal disk space.

      • If you disable this option, you can still see the field in the Content Browser until the next rebuild operation (see Refresh VS Rescan VS Rebuild).

    • Free text search

      Whether the content of the field can be queried using free text. This option is not selected by default and is available only if the field type is String.

      If free text search is allowed on @author, items returned when querying @author=John are also returned when querying John; however, the query John also returns items containing the word John in their content, not only in the author field).

    • Ranking

      Whether the field is used in the standard ranking score calculation. This option is not selected by default since the option has a significant impact on query performance.

      If ranking is enabled on the field Product, when a customer searches for “Product A” and some search results have Product A as a field value, those results would be ranked higher.

    • Stemming

      Whether the user query is stemmed in a filter specific to the field. If the value of the field shares the same root as a keyword entered by end-users, the related item appears in search results. This option is not selected by default since the option has a significant impact on query performance.

      The words search, searching, and searched share the same root or stem: search-. When a user queries searching in item titles (@title=searching), the Coveo Cloud Platform returns items with a title containing the words searching, search, searches, and searched.

    • Use cache for sort

      Whether to keep the entire field in memory for fast sorting.

      Fields that are configured for sorting and are often used should be kept in memory (see Sortable).

    • Use cache for computed fields

      Whether to keep in memory data for computed fields. The following two use cases require the option to be selected:

      If not selected in those scenarios, queries related to those fields might take over a second to return results, depending on your number of items.

      • Calculated facet

        You calculate the average of the field size to populate the field author that is used as a facet. In which case, the field size must use the cache.

      • Query function expression that references a field (see Query Function).

        The following query function requires the filezizekb field to use the cache: function:"@syssize/1024" : fieldName:"@filesizekb".

    • Use cache for nested queries

      Select to keep in memory the data required to perform nested queries (see Nested Queries).

      This option also improves the performance of queries containing advanced search operators: /= (regex), *= (wildcards), %= (phonetic match), and ~= (fuzzy match).

    • Use cache for numeric queries

      Select to keep the proper information in memory to execute operations on numerical fields, including operations on dates.

      • This option also makes the calculations related to numerical range facets faster. Thus, using the cache significantly improves the performance to automatically generate the interval values in numerical range facets and to dynamically update those values based on the content returned by the index following a user query.

      • Using the cache for numeric queries allows to use numerical fields as facets, specify the number of ranges, and let the Coveo Cloud Platform index establishes the ranges.

      • Executing a query on a numerical field, especially a query that covers the entire range, impacts the query performance if the field does not use the cache.

      • If your numerical field is stored as a String, you must change its type (see Field Type).

    The following table lists the available options depending on the field type and sometimes the field use.

    Options / Field type String Integer 32 Integer 64 Decimal Date
    Search operator
    Displayable in results
    Free text search        
    Ranking        
    Stemming        
    Use cache for sort 1
    Use cache for computed fields  
    Use cache for nested queries 2
    User cache for numeric queries  

    Note 1: Only available when Sort is selected.

    Note 2: Only available when Facet or Multi-value facet is selected.

  7. Click Add Field or Save.

What’s Next?