I think I see what the problem is.
Correct me if I'm wrong but I guess your schema does not represent a person but something which can contain a list of persons with different attributes, right?

The problem is that you can't reproduce easily the hierarchy of structured data. There is no attribute in lucene index as there can be in a xml document. If your structured data is not too complex, you could try to add a field to your schema called "person" and concatenate all properties (name, age, role, country) into this unique field but that solution works only if you don't need to search for this properties...

Regards,
Gary Long

Le 10/05/2012 14:25, Bruno Mannina a écrit :
Dear,

I can't find how can I define in my schema.xml a field with this format?

My original format is:

<exch:inventors>

<exch:inventor>
<exch:inventor-name>
<name>WEBER WALTER</name>
</exch:inventor-name>
<residence>
<country>CH</country>
</residence>
</exch:inventor>

<exch:inventor>
<exch:inventor-name>
<name>ROSSI PASCAL</name>
</exch:inventor-name>
<residence>
<country>FR</country>
</residence>
</exch:inventor>

</exch:inventors>

I convert it to:
...
<field name="inventor">WEBER WALTER</field>
<field name="inventor">ROSSI PASCAL</field>
...

but how can I add Country code to the field without losing the link between inventor?
Can I use an attribut ?

Any idea are welcome :)

Thanks,
Bruno Mannina

Reply via email to