Mapping Fields in the Workbench

The Field Mapping stage in Indexing Pipeline  is used to map fields in an index pipeline document to a target field.

You can:

  • Set a field value, Rename a field, Copy one field to another, or Remove a field.
  • Define a condition for the field mapping stage. The field mapping actions occur on the documents that satisfy the given condition.
  • Re-order or delete a Field Mapping.
  • Simulate to test the changes before saving them.

Ensure to click Train your App each time you make changes to any index configuration. This builds the index based on the updated configurations.


To configure field mapping, take the following steps:

  1. Click the Indices tab on the top.
  2. On the left pane, under the Index Configuration section, click Workbench.
  3. On the Workbench page, on the Stages column, click the + icon.
  4. Select Field Mapping from the Stage Type dropdown.
  5. Enter a name in the Stage Name field.
  6. Enter a condition in the Condition field. Add multiple conditions using AND/OR connectors. SearchAssist considers the documents that satisfy the conditions as part of the stage. 
  7. Select an action from the Action dropdown. See the following details.
  8. Click Simulate to verify the configurations. The simulator displays the Source and the number of documents to which the mapping was applied, and the result. You can change the Source and the number of documents if there is no mention in the conditions. 
  9. Once done, click Save Configuration on the top-right. For example, select Set from the Actions dropdown list; enter Title in the Field Name field and enter Heading in the Value field. Click Simulate to verify if the field value is changed. Perform associated Actions to:
    • Set a Value for the Field Name
    • Rename to a New Name for the Field Name.
    • Copy the Source Field to the Target Field.
    • Remove  the Field Name.
  10. Use the handlebar to reorder the action sequence as required.

Conditions:

Condition is of the following format: ctx.fieldtype==value or ctx.fieldtype!=value.

For example, ctx.contentType==”web” to restrict the mapping to content from a web source