The Field Mapping stage in Indexing Pipeline is used to map fields in an index pipeline document to a target field.
- 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.
To configure field mapping, take the following steps:
- Click the Indices tab on the top.
- On the left pane, under the Index Configuration section, click Workbench.
- On the Workbench page, on the Stages column, click the + icon.
- Select Field Mapping from the Stage Type dropdown.
- Enter a name in the Stage Name field.
- 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.
- Select an action from the Action dropdown. See the following details.
- 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.
- 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.
- Use the handlebar to reorder the action sequence as required.
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