Hello,

you can try with:

SolrConfig.config.getResourceLoader().getInstanceDir()

Let me know if it works.

Cheers,
Giovanni


On 4/1/09, Radha C. <cra...@ceiindia.com> wrote:
>
> Hey No,
>
> Actually I did not look at your response email. But I saw your email after
> I
> responded to shalin and you gave me a correct answer. Thanks a lot.
> So I started coding it also, I thought to reply to u once I executed
> successfully. Here is my code,
> DirectXmlRequest xmlreq = new DirectXmlRequest( "/update", xml.toString()
> );
>
> server.request( xmlreq );
>
> server.commit();
> But I am having trouble in identifying the xml location,
> I am having the input xml in $solrhome/inputdata/example.xml, Do you have
> any idea about how to get solrhome
> location dynamically by using any solrj API class?
>
>
> _____
>
> From: Giovanni De Stefano [mailto:giovanni.destef...@gmail.com]
> Sent: Wednesday, April 01, 2009 7:30 PM
> To: solr-user@lucene.apache.org; cra...@ceiindia.com
> Subject: Re: Indexing fields of xml file using solrj
>
>
> I understand Shalin is a guru and I am nobody but...
>
>
> http://lucene.apache.org/solr/api/org/apache/solr/client/solrj/request/Direc
> tXmlRequest.html
>
> Is what you need if you want to use Solrj...
>
> :-)
>
>
> On 4/1/09, Radha C. <cra...@ceiindia.com> wrote:
>
> Thanks shalin,
>
> I need to index the xml which is in solr's format only. I want to index
> that
> xnl directly using solrj same like how we post using curl. Is there any API
> class is available for that?
>
> Can you please provide me any reference link?
>
> -----Original Message-----
> From: Shalin Shekhar Mangar [mailto:shalinman...@gmail.com]
> Sent: Wednesday, April 01, 2009 6:07 PM
> To: solr-user@lucene.apache.org; cra...@ceiindia.com
> Subject: Re: Indexing fields of xml file using solrj
>
> On Wed, Apr 1, 2009 at 5:17 PM, Radha C. <cra...@ceiindia.com> wrote:
> > Hi All,
> >
> > I want to index the document fields in a xml file to index using
> > solrj. I know how to index the document fields using doc.addfield().
> > But I dont know how to post the xml document instead of adding each field
> in solrj.
> >
> > Can I index xml file using solrj? Can anyone help me in how to do this?
> >
>
> Solr will only accept xml files which are in the solr's update xml format.
> You cannot post any arbitrary xml (you can convert using the xslt). You can
> also parse it yourself and use solrj for adding the document. There's
> DataImportHandler too which can parse XML using xpath.
>
> --
> Regards,
> Shalin Shekhar Mangar.
>
>
>
>
>

Reply via email to