Adding Fields to a Source

Each Coveo Organization source automatically comes with a set of standard System fields populated from standard metadata. You can also create User defined fields from custom metadata. All these fields can later be used to optimize the search experience.

To add a field to a source

  1. If not already done, log in to your Coveo Organization.

  2. In the navigation menu on the left, under Search Content, select Fields.

    You can also get to the Fields page from the Sources page:

    1. Click the Actions icon (Icon-SourceActions) at the right end of the line for the source on which you want to add a field.

    2. In the contextual menu, click Manage Fields.

    You can see fields applicable to one or more sources by clicking the drop-down icon (Icon-Dropdownb) next to the search box, select the checkbox of the source(s) for which you want to see fields, and then click Apply Filters.

    Admin-CustomFielde

  3. In the Fields page, click Add Field.

  4. In the Add a New Field dialog box:

    Admin-CustomFieldf

    1. In the Name box, enter the field name.

      • The field Name value can only contain alphanumeric characters. Underscores and spaces are ignored by the index.

      • Ensure that the value you enter is unique, as it can otherwise be overwritten by an existing field.

    2. In the Source drop-down menu, select the source on which you want to add a field.

    3. In the Type drop-down menu, select between four value types (String, Integer (32-bit), Long integer (64-bit), Date, or Decimal).

    4. In the Extraction Method drop-down menu:

      1. When selecting Literal string, enter the string that the field should contain in the Content box. The string can be plain text, or use a placeholder.

        In the case of a Salesforce source:

        Admin-CustomFieldsTypeEx2

      2. When selecting Metadata, in the Metadata Name box, enter the name of the metadata used as a source for this field and in the Default Value box, optionally enter the desired default value.

        • In the case of a Salesforce source, when you want to add a field holding the KB article number:

          Admin-CustomFieldsTypeEx1

        • If your source has a custom metadata containing the list of item contributors (doccontributors) and you want to create a field for this metadata, enter doccontributors.

    5. When Type is Date, in the Input Date Format box, enter the string of values for the date format (see Date Format Syntax).

      2014/7/22 is extracted using %Y%m%d.

    6. Under Allow Field to Be Used As, select one or more of the following options:

      • Facet

        Select to be able to create a facet based on this field. Select only when necessary to minimize unnecessary groupby processing.

      • Multi-value

        Applicable only when Facet is selected. Select when the field can contain more than one value so that field values appears as individual occurrences in the facet rather than as one occurrence of semicolon separated values (ex.: value1;value2;value3).

      • Sort

        Select to make search results sortable based on this field. Select only when you really use this field to sort results with a sort component in a search interface because adding sorting fields can have an impact on the index size and performance.

      • Search Operator

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

      • Displayable in Results

        Select to be able to add this field to a search result template (so it appears as an element of a search result). Selected by default because there is no cost to select this option for all fields and it must be selected to see the field in the Content Browser.

      • Free Text Search

        Available for String fields only. Select to also return in search results items for which the keywords entered by end-users in a search box appear in this field.

  5. Click Add Field.

  6. When you made all field changes, click Apply Changes.

    Before clicking Apply Changes, make sure you added all the needed fields for the source since rebuilding a large source can take a significant amount of time and consume a significant number of API calls.

    The source is being rebuilt.

    • A field can only be applied to one source at a time. You must repeat this procedure for each source.

    • Once the source is rebuilt, you can see the search results for your field in the Content Browser by clicking the search icon Icon-Magnifierb.