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 Everton Garcia <ev...@trt12.jus.br> on 2013/08/23 20:34:26 UTC

Schema.xml definition problem

Hello
I want to index the XML below with multivalued fields.
What better way to set the schema.xml since there are nested data?
Thank you.

      <documento>








<id/> //String






<descricao/> //String






<data/> //Date






<conteudo/> //String






<assentamentos> //Multivalued







<assentamento> //First register







<id/> //String






<nome/> //String






<matricula/> //String






<classificacoes> //Multivalued







<classificacao> //First register







<id/> //String






<descricao/> //String






<agrupadores> //Multivalued







<agrupador> //First register







<valor/> //String





<agrupador/>






</agrupadores>






</classificacao>






</classificacoes>






</assentamento>






</assentamentos>






 </documento>












-- 
*Everton Rodrigues Garcia*

Re: Schema.xml definition problem

Posted by Erick Erickson <er...@gmail.com>.
Solr does not index arbitrary XML, it only indexes XML in a very
specific format.

You could write some kind of SolrJ program that parsed your XML
docs and constructed the appropriate SolrInputDocuments.

You could use DIH with some of the XML/XSL transformations,
but be aware that the XSLT bits don't implement the full
specification.

Best,
Erick


On Fri, Aug 23, 2013 at 2:34 PM, Everton Garcia <everton.garcia@trt12.jus.br
> wrote:

> Hello
> I want to index the XML below with multivalued fields.
> What better way to set the schema.xml since there are nested data?
> Thank you.
>
>       <documento>
>
>
>
>
>
>
>
>
> <id/> //String
>
>
>
>
>
>
> <descricao/> //String
>
>
>
>
>
>
> <data/> //Date
>
>
>
>
>
>
> <conteudo/> //String
>
>
>
>
>
>
> <assentamentos> //Multivalued
>
>
>
>
>
>
>
> <assentamento> //First register
>
>
>
>
>
>
>
> <id/> //String
>
>
>
>
>
>
> <nome/> //String
>
>
>
>
>
>
> <matricula/> //String
>
>
>
>
>
>
> <classificacoes> //Multivalued
>
>
>
>
>
>
>
> <classificacao> //First register
>
>
>
>
>
>
>
> <id/> //String
>
>
>
>
>
>
> <descricao/> //String
>
>
>
>
>
>
> <agrupadores> //Multivalued
>
>
>
>
>
>
>
> <agrupador> //First register
>
>
>
>
>
>
>
> <valor/> //String
>
>
>
>
>
> <agrupador/>
>
>
>
>
>
>
> </agrupadores>
>
>
>
>
>
>
> </classificacao>
>
>
>
>
>
>
> </classificacoes>
>
>
>
>
>
>
> </assentamento>
>
>
>
>
>
>
> </assentamentos>
>
>
>
>
>
>
>  </documento>
>
>
>
>
>
>
>
>
>
>
>
>
> --
> *Everton Rodrigues Garcia*
>