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 Pierre Lacchini <pl...@peopleware.lu> on 2003/02/14 10:49:41 UTC
Indexing XML with Lucene
Hello,
I'm using Lucene, and I need to index an XML Database (Tamino).
How can I do that ? Do i have to use an XML parser as Digester ?
I'm kinda noob with Lucene, and I really need help ;)
Thx !Pierre Lacchini
Consultant développement
PeopleWare
12, rue du Cimetière
L-8413 Steinfort
Phone : + 352 399 968 35
http://www.peopleware.lu
Re: Indexing XML with Lucene
Posted by Che Dong <ch...@hotmail.com>.
Maybe you can use SAX parse and indexing xml source streamly.
Here is my demo:
http://www.chedong.com/tech/lucene_ext.tar.gz
Che, Dong
http://www.chedong.com
----- Original Message -----
From: "Pierre Lacchini" <pl...@peopleware.lu>
To: <lu...@jakarta.apache.org>
Sent: Friday, February 14, 2003 5:49 PM
Subject: Indexing XML with Lucene
> Hello,
>
> I'm using Lucene, and I need to index an XML Database (Tamino).
> How can I do that ? Do i have to use an XML parser as Digester ?
>
> I'm kinda noob with Lucene, and I really need help ;)
>
> Thx !Pierre Lacchini
> Consultant développement
>
> PeopleWare
> 12, rue du Cimetière
> L-8413 Steinfort
> Phone : + 352 399 968 35
> http://www.peopleware.lu
>
>
>
Re: Indexing XML with Lucene
Posted by Jeff Linwood <je...@greenninja.com>.
Hi,
To use Lucene, you will have to have some way of creating Lucene
Document objects, which you can then add to a Lucene index.
Most of the translation work is custom, because everyone's got different
XML DTD's and schemas. There are examples of indexing XML with DOM and
SAX for Lucene in the Lucene Sandbox.
There are probably a few steps you will need to take:
1) Figure out how your XML Schema or DTD maps to a Lucene Document -
which XML elements are going to be which Lucene Fields, and how are they
going to be indexed and stored?
2) Write a JUnit test that will be used to test your document conversion
utility. It should take your XML documents, run them through your
converter, and then check the fields in the Lucene document to make sure
they are what you want. Do this for each type of XML document that you have.
3) Write conversion code that translates an XML document to a Lucene
document. Do this for each type of XML document that you have.
4) Write an indexer utility that goes through your XML database and
feeds XML documents throught the conversion utility and then into the
Lucene indexer.
I might be forgetting one or two steps here :)
Jeff
Pierre Lacchini wrote:
>Hello,
>
>I'm using Lucene, and I need to index an XML Database (Tamino).
>How can I do that ? Do i have to use an XML parser as Digester ?
>
>I'm kinda noob with Lucene, and I really need help ;)
>
>Thx !Pierre Lacchini
>Consultant développement
>
>PeopleWare
>12, rue du Cimetière
>L-8413 Steinfort
>Phone : + 352 399 968 35
>http://www.peopleware.lu
>
>
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-user-help@jakarta.apache.org