DeleteTransformer
Delete the metadata fields provided
Notesโ
This functionality allows you to delete a document from the index. Exact field names (case-insensitive) to delete can be provided as well as a regular expression that matches one or many fields.
Parser Handler Compatibilityโ
This functionality can be applied as either a pre-parse or post-parse handler.
Examplesโ
The following example deletes all metadata fields starting with "X-".
- YAML
- JSON
- XML
handler:
class: DeleteTransformer
fieldMatcher:
method: REGEX
pattern: ^[Xx]-.*
{
"handler": {
"class": "DeleteTransformer",
"fieldMatcher": {
"method": "REGEX",
"pattern": "^[Xx]-.*"
}
}
}
<handler>
<class>DeleteTransformer</class>
<fieldMatcher>
<method>REGEX</method>
<pattern>^[Xx]-.*</pattern>
</fieldMatcher>
</handler>
Usageโ
Full configuration skeleton, with every option and its default
- YAML
- JSON
- XML
class: DeleteTransformer
fieldMatcher:
ignoreCase: false
ignoreDiacritic: false
matchEmpty: false
method: BASIC
negateMatches: false
partial: false
pattern: string
replaceAll: false
trim: false
label: string
{
"class": "DeleteTransformer",
"fieldMatcher": {
"ignoreCase": false,
"ignoreDiacritic": false,
"matchEmpty": false,
"method": "BASIC",
"negateMatches": false,
"partial": false,
"pattern": "string",
"replaceAll": false,
"trim": false
},
"label": "string"
}
<handler>
<class>DeleteTransformer</class>
<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>
<label>string</label>
</handler>
Propertiesโ
| Property | Type | Required | Default |
|---|---|---|---|
fieldMatcher | TextMatcher | No | TextMatcher |
label | string | No | - |
Property Detailsโ
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.
labelโ
An optional, user-supplied label for this step in the importer pipeline. It has no effect on processing โ it exists purely to help identify this step, for example in large configurations or in the visual configurator.