Hi Nick, Thanks for taking the time to reply to my question.
You are right I am a bit confused by the different ways. Okay - if I don't do the custom parser and follow https://tika.apache.org/1.11/parser_guide.html#Add_your_MIME-Type I have the following directory structure . ├── org │ └── apache │ └── tika │ ├── mime │ │ └── custom-mimetypes.xml │ └── parser │ └── hello │ ├── HelloParser.class │ └── HelloParser.java └── tika-server-1.11.jar I tried to add a classpath attribute but that didn't seem to change anything: java -classpath "." -jar tika-server-1.11.jar -h 0.0.0.0 The server is functioning but when I go to the list of parsers HelloParser is not there. James On Tue, Feb 2, 2016 at 2:23 PM, Nick Burch <[email protected]> wrote: > 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 >
