Search Manual / Version 2107
Table Of Contents
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>