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 Erwin Lawardy <la...@hotmail.com> on 2009/02/26 04:34:51 UTC
uploading binary file or rich document through SOLRJ
Hi All,
I have been uploading my rich document(pdf/doc/xls) though url and it works properly.
http://localhost:8983/solr/update/rich?stream.type=doc&stream.file=SOLR_HOME/test.pdf.doc&id=101&stream.fieldname=name&commit=true
Is there a way to do it through solrj as I am trying to build an application to post/upload it programatically.
Thanks,
Erwin
_________________________________________________________________
Get the most out of your life online! Click here for the latest news and tips.
http://livelife.ninemsn.com.au/
Re: uploading binary file or rich document through SOLRJ
Posted by Erik Hatcher <er...@ehatchersolutions.com>.
It actually is possible now to make that sort of request now... note
that he's not actually posting file content in the request, but using
a simple HTTP get parameter stream.file. Using the SolrJ library, you
can simply use the add/set methods on SolrQuery.
But yes, it would be great for SolrJ to support posting arbitrary
streams.
Erwin, the rich content update handler patch that you are apparently
using has been refactored and built into Solr's trunk now (nicknamed
Solr Cell, aka ExtractingRequestHandler). You'll be better off using
the new stuff.
Erik
On Feb 25, 2009, at 10:51 PM, Noble Paul നോബിള്
नोब्ळ् wrote:
> it is possible , but with some work.
>
> you may need to write a new RequestWriter implementation which extends
> org.apache.solr.client.solrj.request.RequestWriter for that .
>
> It will be a nice addition to SolrJ if it can be contributed back.
>
>
>
> On Thu, Feb 26, 2009 at 9:04 AM, Erwin Lawardy <la...@hotmail.com>
> wrote:
>>
>> Hi All,
>>
>> I have been uploading my rich document(pdf/doc/xls) though url and
>> it works properly.
>> http://localhost:8983/solr/update/rich?stream.type=doc&stream.file=SOLR_HOME/test.pdf.doc&id=101&stream.fieldname=name&commit=true
>>
>> Is there a way to do it through solrj as I am trying to build an
>> application to post/upload it programatically.
>>
>> Thanks,
>>
>> Erwin
>>
>>
>> _________________________________________________________________
>> Get the most out of your life online! Click here for the latest
>> news and tips.
>> http://livelife.ninemsn.com.au/
>
>
>
> --
> --Noble Paul
Re: uploading binary file or rich document through SOLRJ
Posted by Noble Paul നോബിള് नोब्ळ् <no...@gmail.com>.
it is possible , but with some work.
you may need to write a new RequestWriter implementation which extends
org.apache.solr.client.solrj.request.RequestWriter for that .
It will be a nice addition to SolrJ if it can be contributed back.
On Thu, Feb 26, 2009 at 9:04 AM, Erwin Lawardy <la...@hotmail.com> wrote:
>
> Hi All,
>
> I have been uploading my rich document(pdf/doc/xls) though url and it works properly.
> http://localhost:8983/solr/update/rich?stream.type=doc&stream.file=SOLR_HOME/test.pdf.doc&id=101&stream.fieldname=name&commit=true
>
> Is there a way to do it through solrj as I am trying to build an application to post/upload it programatically.
>
> Thanks,
>
> Erwin
>
>
> _________________________________________________________________
> Get the most out of your life online! Click here for the latest news and tips.
> http://livelife.ninemsn.com.au/
--
--Noble Paul