lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Klaus Hubert <>
Subject RE: SIMPLE Lucene / MySQL Indexer
Date Wed, 13 Jul 2005 12:04:12 GMT
Hi Ian,

That's something I'm looking for. Right, a simple
source code which reads a
database and adds the fields to the index. What I've
found also so far is
another solution at
First step is
to export my MySQL database in simple XML and go from
there. It is just an
additional step and I would stick with this if I don't
find another method
to do all at once.



-----Original Message-----
From: Ian Lea [] 
Sent: Wednesday, July 13, 2005 10:19 AM
Subject: Re: SIMPLE Lucene / MySQL Indexer

Something like this?

IndexWriter iw = whatever
ResultSet rs = whatever

while ( {
   Document ldoc = new Document();
   ldoc.add(Field.Text("f1", rs.getString("f1"));
   ldoc.add(Field.Unstored("f2", rs.getString("f2"));
   ldoc.add(Field.Keyword("f3", rs.getString("f3"));


On the IDE front, most people seem to use Eclipse


On 13/07/05, Klaus Hubert <>
> Hi,
> I played with several search engines to replace
> and hope that Lucene is the best solution for that.
> I am reading Mannings book on Lucene in action and
it seems to be the 
> most powerful search engine I found so far.
> I'm stuck at some problem and need help from you
experts. I managed to 
> create an index as described in the examples. I also
managed to read a 
> MySQL database in Java.
> My question is, if anybody here has some SIMPLE
example which does 
> this in one step. I am good in PHP and in Visual
Basic, but very new 
> to Java. Maybe I'm using the wrong tools (NetBeans
IDE and JCreator) 
> but I don't get it managed to create an Lucene Index
on 3 database 
> fields.
> I appreciate any help.
> Thank you so much,
>   Klaus

To unsubscribe, e-mail:
For additional commands, e-mail:

Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message