You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by 122jxgcn <yw...@gmail.com> on 2012/08/13 11:49:54 UTC

Setting metadata while indexing custom file

Hello,

I'd like to set Content-Type of the file while I'm using
ExtractRequestHandler to pass file to Tika.
As I'm indexing custom file type, it seems that Tika is not matching my file
to the right custom parser.
So I really need to explicitly declare Content-Type of my custom file so
that it cannot miss the right parser.
Until now, passing filename by resource.name variable is not working for me.

How can I do this?
Thanks.



--
View this message in context: http://lucene.472066.n3.nabble.com/Setting-metadata-while-indexing-custom-file-tp4000781.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: Setting metadata while indexing custom file

Posted by Jack Krupansky <ja...@basetechnology.com>.
The wiki page show how to use the -H option of curl to set the Content-Type.

See:
http://wiki.apache.org/solr/ExtractingRequestHandler

SolrJ requires some extra coding.

-- Jack Krupansky

-----Original Message----- 
From: 122jxgcn
Sent: Monday, August 13, 2012 5:49 AM
To: solr-user@lucene.apache.org
Subject: Setting metadata while indexing custom file

Hello,

I'd like to set Content-Type of the file while I'm using
ExtractRequestHandler to pass file to Tika.
As I'm indexing custom file type, it seems that Tika is not matching my file
to the right custom parser.
So I really need to explicitly declare Content-Type of my custom file so
that it cannot miss the right parser.
Until now, passing filename by resource.name variable is not working for me.

How can I do this?
Thanks.



--
View this message in context: 
http://lucene.472066.n3.nabble.com/Setting-metadata-while-indexing-custom-file-tp4000781.html
Sent from the Solr - User mailing list archive at Nabble.com.