GenericMetadataFilter
Filter by one or more matching metadata field values.
Notesโ
Filters documents based on metadata field names and values using configurable text matchers. Documents are included or excluded depending on whether a specified field matches the given value pattern.
Examplesโ
The following example filters out Zip documents base on a "Content-Type" metadata field.
- YAML
- JSON
- XML
class: GenericMetadataFilter
onMatch: EXCLUDE
fieldMatcher:
pattern: Content-Type
valueMatcher:
pattern: application/zip
{
"class": "GenericMetadataFilter",
"onMatch": "EXCLUDE",
"fieldMatcher": {
"pattern": "Content-Type"
},
"valueMatcher": {
"pattern": "application/zip"
}
}
<class>GenericMetadataFilter</class>
<onMatch>EXCLUDE</onMatch>
<fieldMatcher>
<pattern>Content-Type</pattern>
</fieldMatcher>
<valueMatcher>
<pattern>application/zip</pattern>
</valueMatcher>
Usageโ
Full configuration skeleton, with every option and its default
- YAML
- JSON
- XML
class: GenericMetadataFilter
fieldMatcher:
ignoreCase: false
ignoreDiacritic: false
matchEmpty: false
method: BASIC
negateMatches: false
partial: false
pattern: string
replaceAll: false
trim: false
onMatch: INCLUDE
valueMatcher:
ignoreCase: false
ignoreDiacritic: false
matchEmpty: false
method: BASIC
negateMatches: false
partial: false
pattern: string
replaceAll: false
trim: false
{
"class": "GenericMetadataFilter",
"fieldMatcher": {
"ignoreCase": false,
"ignoreDiacritic": false,
"matchEmpty": false,
"method": "BASIC",
"negateMatches": false,
"partial": false,
"pattern": "string",
"replaceAll": false,
"trim": false
},
"onMatch": "INCLUDE",
"valueMatcher": {
"ignoreCase": false,
"ignoreDiacritic": false,
"matchEmpty": false,
"method": "BASIC",
"negateMatches": false,
"partial": false,
"pattern": "string",
"replaceAll": false,
"trim": false
}
}
<genericMetadataFilter>
<class>GenericMetadataFilter</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>
<onMatch>INCLUDE</onMatch>
<valueMatcher>
<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>
</valueMatcher>
</genericMetadataFilter>
Propertiesโ
| Property | Type | Required | Default |
|---|---|---|---|
fieldMatcher | TextMatcher | No | TextMatcher |
onMatch | enum | No | INCLUDE |
valueMatcher | TextMatcher | No | TextMatcher |
Property Detailsโ
fieldMatcherโ
Use the following fields to dictate how field names should be matched by this filter.
onMatchโ
What to do with a matching metadata field value.
Allowed Valuesโ
INCLUDEEXCLUDE
valueMatcherโ
Use the following fields to dictate how field values should be matched by this filter.