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 Spadez <ja...@hotmail.com> on 2012/11/16 15:38:33 UTC

How to format xml for Solr import

Hi,

I was wondering if someone could show me an example XML file for use to
import to solr. Bascially I have the following information that I am trying
to import to solr:

Title
Description
Keyword Description
Source
Location Name
Location Co-ordinates
URL
Time

I've never worked with XML before so I have no idea how this file should be
formatted. Any help or prods in the right direction would be appreciated.



--
View this message in context: http://lucene.472066.n3.nabble.com/How-to-format-xml-for-Solr-import-tp4020729.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: How to format xml for Solr import

Posted by Marcin Rzewucki <mr...@gmail.com>.
Hi,

You can prepare the following structure:
<add>
 <doc>
   <field name="solrfieldname1">value1</field>
   <field name="solrfieldname2">value2</field>
 </doc>
</add>

You can find sample files in solr package (example/exampledocs/ dir) along
with "post.sh" script which might be useful for you.
Regards.


On 16 November 2012 15:38, Spadez <ja...@hotmail.com> wrote:

> Hi,
>
> I was wondering if someone could show me an example XML file for use to
> import to solr. Bascially I have the following information that I am trying
> to import to solr:
>
> Title
> Description
> Keyword Description
> Source
> Location Name
> Location Co-ordinates
> URL
> Time
>
> I've never worked with XML before so I have no idea how this file should be
> formatted. Any help or prods in the right direction would be appreciated.
>
>
>
> --
> View this message in context:
> http://lucene.472066.n3.nabble.com/How-to-format-xml-for-Solr-import-tp4020729.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>