How to format xml for Solr import

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

How to format xml for Solr import

Spadez
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.
Reply | Threaded
Open this post in threaded view
|

Re: How to format xml for Solr import

Marcin Rzewucki
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 <[hidden email]> 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.
>