loading table of contents...

Search Manual / Version 2207

Table Of Contents 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.

  <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"/>

Search Results

Table Of Contents

Your Internet Explorer is no longer supported.

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