You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@lucene.apache.org by Th...@gmx.net on 2004/01/16 14:18:41 UTC

Indexing of deep structured XML

Hello all,

it is obviously possible to index the follwoing XML structure in Lucene:

<address>
  <name/>
  <street/>
  <postcode/>
  <niceplace/>
</address>

by mapping all the xml tags (name, street, postcode and city) it to the
documents (address) fields directly. However is it also possible to map these?

<address>
  <name/>
  <street/>
  <area>
    <niceplace/>
  </area>
</address>

Here we have a hierarchy in area (niceplace) which I want to preserve.
Suppose that the meaning of niceplace in an area is different from the niceplace
in the first xml structure (closer specified). I want to preserve this. 

Is there a way to index with Lucene means? If not, are there any attempt of
people doing this or does somebody have ideas how this could be solved?

Cheers,
Karl

-- 
+++ GMX - die erste Adresse für Mail, Message, More +++
Neu: Preissenkung für MMS und FreeMMS! http://www.gmx.net



---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-user-help@jakarta.apache.org


Re: Indexing of deep structured XML

Posted by Thomas Krämer <kr...@smail.uni-koeln.de>.
Hi Karl, ol' fellow


try the apache commons digester.
there is a nice explanation about how it works written by thomas habing.

regards

thomas

TheRanger@gmx.net wrote:
> Hello all,
> 
> it is obviously possible to index the follwoing XML structure in Lucene:
> 
> <address>
>   <name/>
>   <street/>
>   <postcode/>
>   <niceplace/>
> </address>
> 
> by mapping all the xml tags (name, street, postcode and city) it to the
> documents (address) fields directly. However is it also possible to map these?
> 
> <address>
>   <name/>
>   <street/>
>   <area>
>     <niceplace/>
>   </area>
> </address>
> 
> Here we have a hierarchy in area (niceplace) which I want to preserve.
> Suppose that the meaning of niceplace in an area is different from the niceplace
> in the first xml structure (closer specified). I want to preserve this. 
> 
> Is there a way to index with Lucene means? If not, are there any attempt of
> people doing this or does somebody have ideas how this could be solved?
> 
> Cheers,
> Karl
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-user-help@jakarta.apache.org


Re: Indexing of deep structured XML

Posted by Markus Spath <ms...@arcor.de>.
TheRanger@gmx.net wrote:
...
> by mapping all the xml tags (name, street, postcode and city) it to the
> documents (address) fields directly. However is it also possible to map these?
> 
> <address>
>   <name/>
>   <street/>
>   <area>
>     <niceplace/>
>   </area>
> </address>
> 
> Here we have a hierarchy in area (niceplace) which I want to preserve.
> Suppose that the meaning of niceplace in an area is different from the niceplace
> in the first xml structure (closer specified). I want to preserve this. 
> 
> Is there a way to index with Lucene means? If not, are there any attempt of
> people doing this or does somebody have ideas how this could be solved?
> 

I usually preprocess hierarchical xml documents via xslt to generate flat ones 
with coresponding element - field names before indexing.

<address>
   <name/>
   <street/>
   <niceplace_in_area/> or <niceplace area="1" />
</address>

Markus



---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-user-help@jakarta.apache.org