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 Alisson Vieira <al...@gmail.com> on 2012/07/23 15:53:54 UTC
Get value attribute
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
Re: Get value attribute
Posted by Alexandre Rafalovitch <ar...@gmail.com>.
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 <al...@gmail.com> 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
Re: Get value attribute
Posted by Tomás Fernández Löbbe <to...@gmail.com>.
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 <al...@gmail.com>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
>