TikaParser
Provides direct access to Apache Tika's parsing capabilities
Notes
The importer mostly uses Apache Tika as its default parser to automatically extract textual content and metadata from diverse file types (including PDFs, Microsoft Office documents, images, and HTML). The TikaParser class offers users explicit control over this parsing process, enabling advanced configurations like custom MIME type handling, embedded resource extraction, OCR support, and user-defined Tika configuration files. If direct interaction or detailed customization of Tika parsing is required beyond Norconex’s default settings, users should explicitly configure and use TikaParser.
The parser behavior and format coverage available through TikaParser are a
built-in baseline. They can be extended and customized through parser
configuration and pipeline composition for customer-specific requirements.
Examples
The following example defined a TikaParser with a custom configuration file.
- YAML
- JSON
- XML
handler:
class: TikaParser
tikaConfigFile: /path/to/tika-config.xml
{
"handler": {
"class": "TikaParser",
"tikaConfigFile": "/path/to/tika-config.xml"
}
}
<handler>
<class>TikaParser</class>
<tikaConfigFile>/path/to/tika-config.xml</tikaConfigFile>
</handler>
Usage
Full configuration skeleton, with every option and its default
- YAML
- JSON
- XML
class: TikaParser
label: string
tikaConfigFile: string
{
"class": "TikaParser",
"label": "string",
"tikaConfigFile": "string"
}
<handler>
<class>TikaParser</class>
<label>string</label>
<tikaConfigFile>string</tikaConfigFile>
</handler>
Properties
| Property | Type | Required | Default |
|---|---|---|---|
label | string | No | - |
tikaConfigFile | string | No | - |
Property Details
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.
tikaConfigFile
Path to a Tika configuration file, giving you Tika's own parser selection and settings. Without it, Tika's defaults apply.