Repository navigation
Transformation Connectors
End-User & Connector Documentation: End-User Guide · Included Connectors · Repository Connectors · Output Connectors · Transformation Connectors · Authority Connectors · User Mapping Connectors · Notification Connectors
The Allowed Documents transformation filter is used to limit the documents that will be fetched and passed down the pipeline for indexing. The filter allows documents to be restricted by mime type, by extension, and by length.
It is important to note that these various methods of filtering rely on the upstream repository connection type to implement. Some repository connection types do not implement all of the available methods of filtering. For example, filtering by URL (and hence file extension) makes little sense in the context of a repository connection type whose URLs do not include a full file name.
As with all document transformers, more than one Allowed Documents transformation filter can be used in a single pipeline. This may be useful if other document transformers (such as the Tika Content Extractor, below) change the characteristics of the document being processed.
The Allowed Documents transformation connection type does not require anything other than standard configuration information.
The Allowed Documents transformation connection type contributes a single tab to a job definition. This is the "Allowed Contents" tab, which looks like this:
Allowed Documents specification, Allowed Contents tab
Fill in the maximum desired document length, the set of extensions that are allowed, and the set of mime types that are allowed. All extensions and mime types are case insensitive. For extensions, the special value "." matches a missing or empty extension.
The Metadata Adjuster transformation filter reorganizes and concatenates metadata based on rules that you provide. This can be very helpful in many contexts. For example, you might use the Metadata Adjuster to label all documents from a particular job with a particular tag in an index. Or, you might need to map metadata from (say) SharePoint's schema to your final output connection type's schema. The Metadata Adjuster permits you to handle both of the scenarios.
As with all document transformers, more than one Metadata Adjuster transformation filter can be used in a single pipeline. This may be useful if other document transformers (such as the Tika Content Extractor, below) change the metadata of the document being processed.
The Metadata Adjuster transformation connection type does not require anything other than standard configuration information.
The Metadata Adjuster transformation connection type contributes one tab to a job definition. This is the "Metadata expressions" tab. The "Metadata expressions" tab looks like this:
Metadata Adjuster specification, Metadata Expressions tab
On the left, you must supply the target metadata name. You may then choose among two possibilities: either you choose to request that this metadata field be removed from the target document, or you can choose to specify a rule that would provide a value for that target metadata item. You can provide more than one rule for the same metadata item, by simply adding additional lines to the table with the same target metadata name. But if you specify a rule to remove the metadata field from the document, that selection overrides all others.
Metadata rules are just strings, which may have field specifications within them. For example, the rule value "hello" will generate a single-valued metadata field with the value "hello". The rule "hello ${there}", on the other hand, will generate a value for each value in the incoming field named "there". If the incoming field had the values "a", "b", and "c", then the rule would generate a three-valued field with values "hello a", "hello b", and "hello c". If more than one incoming field is specified, then a combinatoric combination of the field values will be produced.
You can also use regular expressions in the substitution string, for example: "${there|[0-9]}", which will extract the first sequence of sequential numbers it finds in the value of the field "there", or "${there|string(.)|1}", which will include everything following "string" in the field value. (The third argument specifies the regular expression group number, with an optional suffix of "l" or "u" meaning upper-case or lower-case.)
Enter a parameter name, and either select to remove the value or provide an expression. If you chose to supply an expression, enter the expression in the box. Then, click the "Add" button.
When your expressions have been edited, you can uncheck the "Keep all metadata" checkbox in order to prevent unspecified metadata fields from being passed through. Uncheck the "Remove empty metadata values" checkbox if you want to index empty metadata values.
The null transformer does nothing other than record activity through the transformer. It is thus useful primarily as a coding model, and a diagnostic aid. It requires no non-standard configuration information, and provides no tabs for a job that includes it.
The Tika Content Extractor transformation filter converts a binary document into a UTF-8 text stream, plus metadata. This transformation filter is used primarily when incoming binary content is a possibility, or content that is not binary but has a non-standard encoding such as Shift-JIS. The Tika Content Extractor extracts metadata from the incoming stream as well. This metadata can be mapped within the Tika Content Extractor to metadata field names appropriate for further use downstream in the pipeline.
As with all document transformers, more than one Tika Content Extractor transformation filter can be used in a single pipeline. In the case of the Tika Content Extractor, this does not seem to be of much utility.
The Tika Content Extractor transformation connection type includes an optional "Tika Config" tab where you can supply a custom Apache Tika 4.x JSON configuration (note that Apache Tika 4.x uses JSON configuration format instead of legacy XML tika-config.xml; leave the field blank to use Tika defaults).
The Tika Content Extractor transformation connection type contributes three tabs to a job definition. These are the "Field mapping" tab, the "Exceptions" tab, and the "Boilerplate" tab. The "Field mapping" tab looks like this:
Tika Content Extractor specification, Field Mapping tab
Enter a Tika-generated metadata field name, and a final field name, and click the "Add" button to add the mapping to the list. Uncheck the "Keep all metadata" checkbox if you want unspecified Tika metadata to be excluded from the final document. Note that Apache Tika 4.x uses normalized metadata keys (such as tk:resource-name, dc:title, dc:creator, and dcterms:created); if you are migrating existing field mappings from Tika 1.x–3.x, update your source field names accordingly or configure Tika's LegacyKeyMigrationFilter in Tika Config.
The "Exceptions" tab looks like this:
Tika Content Extractor specification, Exceptions tab
Uncheck the checkbox to allow indexing of document metadata even when Tika fails to extract content from the document.
The "Boilerplate" tab looks like this:
Tika Content Extractor specification, Boilerplate tab
Select the HTML boilerplate removal option you want. These are implementations provided by the "Boilerpipe" project; they are lightly documented, so you will need to experiment with your particular application to find the one most appropriate for your application.
In addition to the transformation connectors documented above, Apache ManifoldCF trunk includes:
-
Content Limiter (
connectors/contentlimiter) — Truncates document content streams to a configured maximum byte length. -
HTML Extractor (
connectors/html-extractor) — Extracts or strips HTML sections using CSS selectors (jsoup). -
OpenNLP (
connectors/opennlp) — Performs named-entity extraction using Apache OpenNLP models. -
Tika Service / Tika Service RMeta (
connectors/tikaservice,connectors/tikaservice-rmeta) — Offloads content and recursive metadata extraction to an external Apache Tika Server over HTTP.
Apache ManifoldCF™ — Website · GitHub · Jira (CONNECTORS) · Mailing Lists · Security Policy · Apache License 2.0
Apache, Apache ManifoldCF, and the Apache feather logo are trademarks of The Apache Software Foundation.
- End-User Guide
- Included Connectors
- Repository Connectors
- Output Connectors
- Transformation Connectors
- Authority Connectors
- User Mapping Connectors
- Notification Connectors
- ManifoldCF SDK
- Developer Resources
- Writing Repository Connectors
- Writing Output Connectors
- Writing Authority Connectors
- Writing Mapping Connectors
- Writing Transformation Connectors