Product DocsMenu

Adding or Modifying Custom Fields

Index fields can contain metadata extracted from structured content of crawled repositories. Field parameters determine to which metadata a field is mapped and how it can be used. You can add or modify custom fields to index additional information not covered by the built-in Coveo fields.

Example: You can index a custom SharePoint column called Department by adding a corresponding custom field (see Adding New Properties to SharePoint References) .

Notes:

  • CES 7.0.7022+ (September 2014) The index automatically processes existing field configuration changes such as allowing faceted search on a field. This process can take a few to several minutes for a large index so you will not immediately see the effect.

  • CES 7.0.6942– (August 2014) When you change the configuration of an existing field, you must rebuild sources that are using this field.

To add custom fields

  1. On the Coveo server, access the Administration Tool (see Opening the Administration Tool).

  2. Select Configuration > Fields.

  3. In the Field Sets page, click the field set to which you want to add or modify a field (see What Are Field Sets?) .

  4. In the navigation panel on the left, select Custom Fields and then:

    • Click Add to create a new custom field.

      OR

    • Click an existing custom field to modify it.

  5. In the Add a Custom Field page:

    1. In the Name box, enter a name to identify the custom field.

      The field name must be made of 1 to 64 characters only from the a-z, A-Z, and 0-9 ranges and must not start with a number. Field names are case insensitive.

      Note: When the Metadata Name (see below) is left empty and the Name exactly matches a metadata name defined in the crawled repository, the content of the metadata is automatically copied to the index field for each crawled document containing this metadata. This is an easy way to map a repository metadata to an index field.

      You can set a Name to be different from the Metadata Name to help you understand the origin of the field.

      Example: You can use a prefix to identify all custom fields from a given repository. You create all custom fields for metadata from a Jive site with the jive prefix. For the Jive creationDate metadata, you create the jivecreationdate custom field.

      Note: This name is used during field queries in the form @fieldname=fieldvalue.

    2. In the Type section, select the option for the type of value accepted by the field.

      Four types are available:

      String

      The field accepts series of characters without mathematical value. Usernames and passwords are string parameters.

      Numeric

      The field accepts integer numbers. The size of a document in bytes is a numeric value.

      Date/time

      The field accepts series of characters and numbers representing a date. The modification date of a document is a date/time value.

      Floating Point

      The field accepts numbers with fractions (ex.: 10.031).

    3. In the Metadata Name box, enter the name of the metadata to which you want to map this field.

      Important: Ensure to type the metadata name exactly as it is spelled in the crawled repository.

      As mentioned above, you can leave this box empty in which case CES rather use the Name to attempt mapping to a metadata name.

    4. In the Default Value box, enter the value indexed when a field is empty. This value must be the same as the field type.

      Example: When the value of the Department field is empty, the default value, String, is indexed.

    5. For Date/time type fields only, in the Date Format box, enter the format of the date in the metadata (see Specifying a Date Format) .

    6. In the Option section, select the appropriate options:

      Include for field queries

      The content of the field can be queried using the format @fieldname=fieldvalue. This option is selected by default.

      Example: The query @sysauthor=John returns documents whose author is John.

      Include for free text queries

      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.

      Example: If free text queries are allowed on @sysauthor, documents returned by @sysauthor=John are also returned by John; however, the query John also returns documents containing the word John in their content, not only in the sysauthor field).

      Allow faceted search on this field

      The content of the field can be used to create a facet to form query refinement groups (see Adding or Customizing a Facet With the .NET Interface Editor) . This option is not selected by default and is available only if the field type is String.

      Example: When the Allow faceted search on this field option is selected for the @sysauthor field, you can create an Author facet allowing users to refine results based on document authors.

      Create a smart date field CES 7.0.5785+ (August 2013)

      A new field is created containing the date of the original field but decomposed in values for the day, week, month, quarter, and year relative to January 1, 1900. The name of the new field is the original field name to which the SmartFacet suffix is appended. This field is useful to create more intuitive date facets and charts.

      Example: The original MyDate field contains 2013-02-24 and the new MyDateSmartFacet field contains D41329;W5904;M1357;Q452;Y113.

      Allow faceted search on a field containing multiple values

      The content of the multi-value field can be used to create a facet to form query refinement groups (see Adding or Customizing a Facet With the .NET Interface Editor) . The semicolon separated multiple values of the field are considered individually. This option is not selected by default and is available only if the field type is String.

      Example: The multi-value @syslanguage field contains French;English for a document. When the Allow faceted search on a field containing multiple values option is selected, in the Language facet based on this field, this document counts twice (for the French and English items) rather than only once for the French;English item.

      Allow to sort query results by this field

      The content of the field can be used to sort search results (see Adding Sort Criteria With the .NET Interface Editor) . This option is not selected by default but is available for all field types.

      Important: Adding sorting fields has an impact on the index size and performance. It is recommended to select the Allow to sort query results by this field option only for fields that you are planning to use to sort by in search interfaces.

      Example: If @sysdate is used to sort results, the Sort by Date function (allowing to sort documents by modification date) is available in the search interface.

      Set as display field

      Selected by default to make the field visible in the Index Browser (see Reviewing Document Details from the Index Browser) and available from the Interface Editor for inclusion as a Display Field in search results (see Adding Display Fields to Search Results With the .NET Interface Editor) . Consider clearing unused fields to minimize the search results download size at query time. You can change this selection later (see Managing Display Fields) .

    7. Click Save.

      Note: CES 7.0.7711+ (June 2015) When the field Name you entered matches the name of a custom or system field alias, you get the following error message:

      This name is already used.

What's Next?

CES 7.0.6942– (August 2014) Rebuild the sources using the field set containing the new or modified field(s) (see Applying an Action to a Collection or a Source) .

CES 7.0.7022+ (September 2014) Depending on the modifications you have made:

  • When you only modified the Options section selection for existing fields, you no longer need to perform source rebuilds.

    Note: The index automatically processes the field configuration change(s). This process can take a few to several minutes for a large index so you will not immediately see the effect.

  • When you add new fields or perform actions on existing fields such as modifying their name or changing their metadata name, you still need to rebuild the sources using the field set containing those fields.

People who viewed this topic also viewed