On Thu, 10 Nov 2011, Bai Shen wrote:
I have a pdf that I'm using tika on, and it's not finding a title.  Is
there a way to configure tika to set the filename as the title if one isn't
found?

Tika doesn't current support that, you'll need to do the check yourself. Shouldn't be too tricky though:

if(metadata.get(Metadata.TITLE) == null &&
   metadata.get(Metadata.RESOURCE_NAME_KEY) != null) {
   metadata.set(Metadata.TITLE) =
        metadata.get(Metadata.RESOURCE_NAME_KEY);
}

Pop that after your call to tika, before you use the responses

Nick

Reply via email to