HierarchyOperation
A single hierarchy expansion operation for the HierarchyTransformer.
Notes
Defines a single hierarchy expansion operation for the HierarchyTransformer. Specifies the source field, separator character, optional target field and target separator, and whether to use regex for the separator and preserve empty segments.
Usage
- YAML
- JSON
- XML
fromField: string
fromSeparator: string
keepEmptySegments: false
onSet: APPEND
regex: false
toField: string
toSeparator: string
{
"fromField": "string",
"fromSeparator": "string",
"keepEmptySegments": false,
"onSet": "APPEND",
"regex": false,
"toField": "string",
"toSeparator": "string"
}
<hierarchyOperation>
<fromField>string</fromField>
<fromSeparator>string</fromSeparator>
<keepEmptySegments>false</keepEmptySegments>
<onSet>APPEND</onSet>
<regex>false</regex>
<toField>string</toField>
<toSeparator>string</toSeparator>
</hierarchyOperation>
Properties
| Property | Type | Required | Default |
|---|---|---|---|
fromField | string | No | - |
fromSeparator | string | No | - |
keepEmptySegments | boolean | No | false |
onSet | enum | No | - |
regex | boolean | No | false |
toField | string | No | - |
toSeparator | string | No | - |
Property Details
fromField
The source metadata field whose value is read as input. When not set, the document content is used as the source.
fromSeparator
The separator character or string used to delimit segments in the source hierarchy path.
keepEmptySegments
Whether empty segments are preserved when building the hierarchy. Default is false, so a value like /a//b yields /a and /a/b rather than an empty level in between.
onSet
Defines what to do when the target field already has one or more values. When unspecified, new values are appended to existing ones by default.
Allowed Values
APPENDPREPENDREPLACEOPTIONAL
regex
A regular expression pattern used for matching.
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.
toSeparator
The separator character or string used to delimit segments in the target hierarchy path.