Get value attribute

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

Get value attribute

Alisson Vieira
hi, good afternoon,

I have the following xml example,

<glossary>
  <word id="1">
    <name>test</name>
    <definition>test</definition>
  </word>
</glossary>

I'd like to index id attribute with solr, How do I do this?
I can get information of name and definition.

thanks very much

Alisson Vieira
Reply | Threaded
Open this post in threaded view
|

Re: Get value attribute

Tomás Fernández Löbbe
Maybe an XSLT that transforms into a "solr xml" format?
http://wiki.apache.org/solr/UpdateXmlMessages

On Mon, Jul 23, 2012 at 10:53 AM, Alisson Vieira <[hidden email]>wrote:

> hi, good afternoon,
>
> I have the following xml example,
>
> <glossary>
>   <word id="1">
>     <name>test</name>
>     <definition>test</definition>
>   </word>
> </glossary>
>
> I'd like to index id attribute with solr, How do I do this?
> I can get information of name and definition.
>
> thanks very much
>
> Alisson Vieira
>
Reply | Threaded
Open this post in threaded view
|

Re: Get value attribute

Alexandre Rafalovitch
In reply to this post by Alisson Vieira
What are you using to import it now? If DataImportHandler, then you
just use /../../@id syntax. If some other XML library, it should have
a way as well.

Regards,
   Alex.
Personal blog: http://blog.outerthoughts.com/
LinkedIn: http://www.linkedin.com/in/alexandrerafalovitch
- Time is the quality of nature that keeps events from happening all
at once. Lately, it doesn't seem to be working.  (Anonymous  - via GTD
book)


On Mon, Jul 23, 2012 at 9:53 AM, Alisson Vieira <[hidden email]> wrote:

> hi, good afternoon,
>
> I have the following xml example,
>
> <glossary>
>   <word id="1">
>     <name>test</name>
>     <definition>test</definition>
>   </word>
> </glossary>
>
> I'd like to index id attribute with solr, How do I do this?
> I can get information of name and definition.
>
> thanks very much
>
> Alisson Vieira