close

Filter

loading table of contents...

Search Manual / Version 2301

Table Of Contents

5.2.7 Configuring Tika ParseContext

Tika uses an instance of org.apache.tika.parser.ParseContext to pass advanced configuration to its parsers. If required, you can customize the ParseContext in the Spring context by adding entries to the map bean tikaParseContext. The map uses java.lang.Class objects as keys and values must be instances of their keys. The following example configures a custom Tika org.apache.tika.extractor.DocumentSelector to decide whether text gets extracted from embedded documents such as attachments in a PDF.

Example
  <customize:append id="tikaConfigCustomizer" bean="tikaParseContext">
    <map key-type="java.lang.Class" value-type="java.lang.Object">
      <entry key="org.apache.tika.extractor.DocumentSelector">
        <bean class="com.example.CustomTikaDocumentSelector"/>
      </entry>
    </map>
  </customize:append>

Search Results

Table Of Contents
warning

Your Internet Explorer is no longer supported.

Please use Mozilla Firefox, Google Chrome, or Microsoft Edge.