MergeOperation
A single merge operation combining matching source fields into a target field.
Notes
Defines a single merge operation for the MergeTransformer. Specifies the source fields to merge (by field matcher), the target field, and whether to combine all values into a single string with an optional separator. Optionally deletes the source fields after merging.
Usage
- YAML
- JSON
- XML
deleteFromFields: false
fieldMatcher:
ignoreCase: false
ignoreDiacritic: false
matchEmpty: false
method: BASIC
negateMatches: false
partial: false
pattern: string
replaceAll: false
trim: false
singleValue: false
singleValueSeparator: string
toField: string
{
"deleteFromFields": false,
"fieldMatcher": {
"ignoreCase": false,
"ignoreDiacritic": false,
"matchEmpty": false,
"method": "BASIC",
"negateMatches": false,
"partial": false,
"pattern": "string",
"replaceAll": false,
"trim": false
},
"singleValue": false,
"singleValueSeparator": "string",
"toField": "string"
}
<mergeOperation>
<deleteFromFields>false</deleteFromFields>
<fieldMatcher>
<ignoreCase>false</ignoreCase>
<ignoreDiacritic>false</ignoreDiacritic>
<matchEmpty>false</matchEmpty>
<method>BASIC</method>
<negateMatches>false</negateMatches>
<partial>false</partial>
<pattern>string</pattern>
<replaceAll>false</replaceAll>
<trim>false</trim>
</fieldMatcher>
<singleValue>false</singleValue>
<singleValueSeparator>string</singleValueSeparator>
<toField>string</toField>
</mergeOperation>
Properties
| Property | Type | Required | Default |
|---|---|---|---|
deleteFromFields | boolean | No | false |
fieldMatcher | TextMatcher | No | TextMatcher |
singleValue | boolean | No | false |
singleValueSeparator | string | No | - |
toField | string | No | - |
Property Details
deleteFromFields
Whether the source fields are removed once merged. Default is false. When toField is itself one of the source fields it is kept regardless, holding the merged result.
fieldMatcher
Matches document fields based on specified patterns and methods. Use this to restrict the handler to operate only on fields whose names satisfy the matcher criteria.
singleValue
Whether the merged values are joined into one value rather than kept as a multi-valued field. Default is false.
singleValueSeparator
Text placed between values when singleValue is true — a comma, a space, a pipe. Without it the values are concatenated with nothing between them.
toField
The target metadata field name where the extracted or computed value will be stored. If a field of the same name already exists, the behavior is controlled by onSet.