On Tue, 2 Feb 2016, James Brooking wrote:
I created a custom content-type like so:
<?xml version="1.0" encoding="UTF-8"?>
<properties>
<parsers>
<parser class="org.apache.tika.parser.DefaultParser">
<mime-exclude>application/hello</mime-exclude>
</parser>
<parser class="org.apache.tika.parser.hello.HelloWorldParser">
<mime>application/hello</mime>
</parser>
</parsers>
</properties>
This was saved into file called parsers.xml.
That's not a custom mime type / content type file, that seems to be a
custom Tika XML file. You seem to be confusing several things...
Firstly, to define the mime type - as explained in
https://tika.apache.org/1.11/parser_guide.html#Add_your_MIME-Type it needs
to be called custom-mimetypes.xml and stored in the directory
org/apache/tika/mime/ somewhere on your classpath
If you want to explicitly load a custom parser, rather than letting auto
loading work for you (which the parser quick guide sets up), then you need
to follow
https://tika.apache.org/1.11/configuring.html#Configuring_Parsers
Nick