I understand Shalin is a guru and I am nobody but... http://lucene.apache.org/solr/api/org/apache/solr/client/solrj/request/DirectXmlRequest.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. > >