Skip to main content

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โ€‹

fromField: string
fromSeparator: string
keepEmptySegments: false
onSet: APPEND
regex: false
toField: string
toSeparator: string

Propertiesโ€‹

PropertyTypeRequiredDefault
fromFieldstringNo-
fromSeparatorstringNo-
keepEmptySegmentsbooleanNofalse
onSetenumNo-
regexbooleanNofalse
toFieldstringNo-
toSeparatorstringNo-

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โ€‹

  • APPEND
  • PREPEND
  • REPLACE
  • OPTIONAL

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.