FAQ
Hi,

I played with several search engines to replace MySQL
FULLTEXT index 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

__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com

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

Search Discussions

  • Chris Lu at Jul 13, 2005 at 3:04 am
    Please allow me to intraduce DBSight.
    It's based on Lucene, oriented for Any database search.

    Most of the things are done by web UI. No coding is needed to create
    your search.
    check out this demo. http://search.dbsight.com

    It's free to download and test. Free for developer edition, non-profit
    usage.

    Chris Lu
    ---
    Full-Text Search on Any Database
    http://www.dbsight.net

    Klaus Hubert wrote:
    Hi,

    I played with several search engines to replace MySQL
    FULLTEXT index 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

    __________________________________________________
    Do You Yahoo!?
    Tired of spam? Yahoo! Mail has the best spam protection around
    http://mail.yahoo.com

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



    --
    Chris Lu
    --------------
    Free-Text Search on Any Database
    http://www.dbsight.net


    ---------------------------------------------------------------------
    To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
    For additional commands, e-mail: java-user-help@lucene.apache.org
  • Ian Lea at Jul 13, 2005 at 8:18 am
    Something like this?

    IndexWriter iw = whatever
    ResultSet rs = whatever

    while (rs.next()) {
    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"));
    ...
    iw.addDocument(ldoc);
    }

    rs.close();
    iw.close();


    On the IDE front, most people seem to use Eclipse nowadays.


    --
    Ian.
    On 13/07/05, Klaus Hubert wrote:
    Hi,

    I played with several search engines to replace MySQL
    FULLTEXT index 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: java-user-unsubscribe@lucene.apache.org
    For additional commands, e-mail: java-user-help@lucene.apache.org
  • Nader Henein at Jul 13, 2005 at 8:42 am
    Also Hibernate, you can use Eclipse as an IDE, with the Hibernator
    plugin to create objects cleanly from your MySQL database and then a few
    lines will fetch an object which you could then be passed to Lucene for
    indexing.

    Nader Henein

    Klaus Hubert wrote:
    Hi,

    I played with several search engines to replace MySQL
    FULLTEXT index 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

    __________________________________________________
    Do You Yahoo!?
    Tired of spam? Yahoo! Mail has the best spam protection around
    http://mail.yahoo.com

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




    --

    Nader S. Henein
    Senior Applications Architect

    Bayt.com


    ---------------------------------------------------------------------
    To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
    For additional commands, e-mail: java-user-help@lucene.apache.org
  • Klaus Hubert at Jul 13, 2005 at 11:59 am
    Hi Chris,

    this is indeed a cool application, but I need just to
    create the index. I
    definitely will look into your file and see if it
    makes my life easier. Can
    you tell any details how long it took to create such a
    huge index? What
    experiences you have with the slowest search? Does it
    go over 1 second? (I
    know, it depends on the hardware, but I'm just
    wondering)

    Thanks,

    Klaus

    -----Original Message-----
    From: Chris Lu
    Sent: Wednesday, July 13, 2005 5:04 AM
    To: java-user@lucene.apache.org
    Subject: Re: SIMPLE Lucene / MySQL Indexer

    Please allow me to intraduce DBSight.
    It's based on Lucene, oriented for Any database
    search.

    Most of the things are done by web UI. No coding is
    needed to create your
    search.
    check out this demo. http://search.dbsight.com

    It's free to download and test. Free for developer
    edition, non-profit
    usage.

    Chris Lu
    ---
    Full-Text Search on Any Database
    http://www.dbsight.net

    Klaus Hubert wrote:
    Hi,

    I played with several search engines to replace MySQL
    FULLTEXT index
    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

    __________________________________________________
    Do You Yahoo!?
    Tired of spam? Yahoo! Mail has the best spam
    protection around
    http://mail.yahoo.com

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


    --
    Chris Lu
    --------------
    Free-Text Search on Any Database
    http://www.dbsight.net


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





    ____________________________________________________
    Start your day with Yahoo! - make it your home page
    http://www.yahoo.com/r/hs


    ---------------------------------------------------------------------
    To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
    For additional commands, e-mail: java-user-help@lucene.apache.org
  • Chris Lu at Jul 13, 2005 at 3:48 pm
    Hi, Klaus, thanks.

    You can simply use DBSight to create the index. It's in Lucene's
    standard format.
    And you can control index field type, analyzers, how to select data
    from database, number of java threads, etc, just by web UI. No coding
    is needed. We have a user who didn't know Lucene at all, and have 3
    database searches up and running in one week.

    To index a huge index, say 1 million records, it may take 5 ~ 24 hours
    depends on the record size, computer size, etc. Actually most of the
    time is spent on JDBC pulling the data.

    Special warning: MySQL's JDBC driver has a bug leading to OutOfMemory
    if you do a select with lots of rows. You must download the latest
    JDBC(dev version) and use setFetchSize().

    Chris
    ---
    Full-Text Search on Any Database
    http://www.dbsight.net
    On 7/13/05, Klaus Hubert wrote:
    Hi Chris,

    this is indeed a cool application, but I need just to
    create the index. I
    definitely will look into your file and see if it
    makes my life easier. Can
    you tell any details how long it took to create such a
    huge index? What
    experiences you have with the slowest search? Does it
    go over 1 second? (I
    know, it depends on the hardware, but I'm just
    wondering)

    Thanks,

    Klaus

    -----Original Message-----
    From: Chris Lu
    Sent: Wednesday, July 13, 2005 5:04 AM
    To: java-user@lucene.apache.org
    Subject: Re: SIMPLE Lucene / MySQL Indexer

    Please allow me to intraduce DBSight.
    It's based on Lucene, oriented for Any database
    search.

    Most of the things are done by web UI. No coding is
    needed to create your
    search.
    check out this demo. http://search.dbsight.com

    It's free to download and test. Free for developer
    edition, non-profit
    usage.

    Chris Lu
    ---
    Full-Text Search on Any Database
    http://www.dbsight.net

    Klaus Hubert wrote:
    Hi,

    I played with several search engines to replace MySQL
    FULLTEXT index
    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

    __________________________________________________
    Do You Yahoo!?
    Tired of spam? Yahoo! Mail has the best spam
    protection around
    http://mail.yahoo.com

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


    --
    Chris Lu
    --------------
    Free-Text Search on Any Database
    http://www.dbsight.net


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





    ____________________________________________________
    Start your day with Yahoo! - make it your home page
    http://www.yahoo.com/r/hs


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

    --
    Chris Lu
    ---------------------
    Full-Text Search on Any Database
    http://www.dbsight.net

    ---------------------------------------------------------------------
    To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
    For additional commands, e-mail: java-user-help@lucene.apache.org
  • Klaus Hubert at Jul 13, 2005 at 12:02 pm
    Hi Nader,

    I downloaded Eclipse and also the Hibernate plugin and
    I really like this
    IDE. It seems to have lots of power. What I didn't
    found so far is a
    Debugger where I can go line by line through the code
    to see errors
    eventually. It runs and I get error messages at the
    line where the problem
    arises. But I cannot go step by step as I was used to
    when Programming
    Visual Basic, PHP or Perl.

    Thanks,

    Klaus

    -----Original Message-----
    From: Nader Henein
    Sent: Wednesday, July 13, 2005 10:42 AM
    To: java-user@lucene.apache.org
    Subject: Re: SIMPLE Lucene / MySQL Indexer

    Also Hibernate, you can use Eclipse as an IDE, with
    the Hibernator plugin to
    create objects cleanly from your MySQL database and
    then a few lines will
    fetch an object which you could then be passed to
    Lucene for indexing.

    Nader Henein

    Klaus Hubert wrote:
    Hi,

    I played with several search engines to replace MySQL
    FULLTEXT index
    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

    __________________________________________________
    Do You Yahoo!?
    Tired of spam? Yahoo! Mail has the best spam
    protection around
    http://mail.yahoo.com

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



    --

    Nader S. Henein
    Senior Applications Architect

    Bayt.com


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





    ____________________________________________________
    Start your day with Yahoo! - make it your home page
    http://www.yahoo.com/r/hs


    ---------------------------------------------------------------------
    To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
    For additional commands, e-mail: java-user-help@lucene.apache.org
  • Klaus Hubert at Jul 13, 2005 at 12:04 pm
    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
    http://www-128.ibm.com/developerworks/java/library/j-lucene/.
    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.

    Thanks,

    Klaus

    -----Original Message-----
    From: Ian Lea
    Sent: Wednesday, July 13, 2005 10:19 AM
    To: java-user@lucene.apache.org
    Subject: Re: SIMPLE Lucene / MySQL Indexer

    Something like this?

    IndexWriter iw = whatever
    ResultSet rs = whatever

    while (rs.next()) {
    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"));
    ...
    iw.addDocument(ldoc);
    }

    rs.close();
    iw.close();


    On the IDE front, most people seem to use Eclipse
    nowadays.


    --
    Ian.
    On 13/07/05, Klaus Hubert wrote:
    Hi,

    I played with several search engines to replace
    MySQL FULLTEXT index
    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:
    java-user-unsubscribe@lucene.apache.org
    For additional commands, e-mail:
    java-user-help@lucene.apache.org



    __________________________________________________
    Do You Yahoo!?
    Tired of spam? Yahoo! Mail has the best spam protection around
    http://mail.yahoo.com

    ---------------------------------------------------------------------
    To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
    For additional commands, e-mail: java-user-help@lucene.apache.org
  • Xing Li at Jul 13, 2005 at 12:15 pm
    Don't make the mistake of complicating the task. Just read straight from mysql into lucene via java. There is no benefit of exporting data to xml just to regrab the data back into lucene.

    Get the Lucene In actioin book if you haven't cause all the samples there are real-world practical. Are you need to add is 10 lines of mysql type java/jdbc code and you are ready to create your first index. Download luke for lucene, GUI testing tool so you can browse the index, perform searches, validate/test search performan bottlenecks, dissect queries, etc.

    On Wednesday, July 13, 2005, at 05:04AM, Klaus Hubert wrote:

    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
    http://www-128.ibm.com/developerworks/java/library/j-lucene/.
    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.

    Thanks,

    Klaus

    -----Original Message-----
    From: Ian Lea
    Sent: Wednesday, July 13, 2005 10:19 AM
    To: java-user@lucene.apache.org
    Subject: Re: SIMPLE Lucene / MySQL Indexer

    Something like this?

    IndexWriter iw = whatever
    ResultSet rs = whatever

    while (rs.next()) {
    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"));
    ...
    iw.addDocument(ldoc);
    }

    rs.close();
    iw.close();


    On the IDE front, most people seem to use Eclipse
    nowadays.


    --
    Ian.
    On 13/07/05, Klaus Hubert wrote:
    Hi,

    I played with several search engines to replace
    MySQL FULLTEXT index
    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:
    java-user-unsubscribe@lucene.apache.org
    For additional commands, e-mail:
    java-user-help@lucene.apache.org



    __________________________________________________
    Do You Yahoo!?
    Tired of spam? Yahoo! Mail has the best spam protection around
    http://mail.yahoo.com

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

    ---------------------------------------------------------------------
    To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
    For additional commands, e-mail: java-user-help@lucene.apache.org
  • Klaus Hubert at Jul 13, 2005 at 12:23 pm
    Hi Xing,

    I have the book and as I wrote in my initial message I
    managed to create the
    sample index as well managed to read mySQL. But I seem
    to be not able to
    combine those programs :-( I'm very new to Java and I
    haven't found a nice
    Debugger so far to go step by step through my code. I
    will try today all day
    to get this fixed. I know, it shouldn't be too
    difficult.

    Thank you,

    Klaus

    -----Original Message-----
    From: Xing Li
    Sent: Wednesday, July 13, 2005 2:15 PM
    To: java-user@lucene.apache.org
    Subject: RE: SIMPLE Lucene / MySQL Indexer

    Don't make the mistake of complicating the task. Just
    read straight from
    mysql into lucene via java. There is no benefit of
    exporting data to xml
    just to regrab the data back into lucene.

    Get the Lucene In actioin book if you haven't cause
    all the samples there
    are real-world practical. Are you need to add is 10
    lines of mysql type
    java/jdbc code and you are ready to create your first
    index. Download luke
    for lucene, GUI testing tool so you can browse the
    index, perform searches,
    validate/test search performan bottlenecks, dissect
    queries, etc.


    On Wednesday, July 13, 2005, at 05:04AM, Klaus Hubert
    wrote:
    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
    http://www-128.ibm.com/developerworks/java/library/j-lucene/.
    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.

    Thanks,

    Klaus

    -----Original Message-----
    From: Ian Lea
    Sent: Wednesday, July 13, 2005 10:19 AM
    To: java-user@lucene.apache.org
    Subject: Re: SIMPLE Lucene / MySQL Indexer

    Something like this?

    IndexWriter iw = whatever
    ResultSet rs = whatever

    while (rs.next()) {
    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"));
    ...
    iw.addDocument(ldoc);
    }

    rs.close();
    iw.close();


    On the IDE front, most people seem to use Eclipse nowadays.

    --
    Ian.
    On 13/07/05, Klaus Hubert wrote:
    Hi,

    I played with several search engines to replace
    MySQL FULLTEXT index
    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:
    java-user-unsubscribe@lucene.apache.org
    For additional commands, e-mail:
    java-user-help@lucene.apache.org



    __________________________________________________
    Do You Yahoo!?
    Tired of spam? Yahoo! Mail has the best spam
    protection around
    http://mail.yahoo.com

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





    ____________________________________________________
    Start your day with Yahoo! - make it your home page
    http://www.yahoo.com/r/hs


    ---------------------------------------------------------------------
    To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
    For additional commands, e-mail: java-user-help@lucene.apache.org
  • Xing Li at Jul 13, 2005 at 12:38 pm
    Kalus,

    Just a few days ago I couldn't even remember how to compile java code. Last time I touched java was like 2001. Don't worry, Lucene is extremely easy, once you know a bit of fund java. It's no different than any other language. Just syntax. I recommend Java from Deitel & Deitel. Fell in love with their practical written style back in college.

    Below is what I whipped up quick to test mysql connections...

    Just add the following to an lucene book sample. You need to download ConnectJ jdbc driver from mysql site and put the jar file in your path variable.

    my_db db = new my_db();
    db.connect();

    ResultSet = rs;

    rs = db.query("select * from mytable limit 100");

    whiel(rs.next()) {
    ....... = rs.getString("mysqltablefieldname"); //return string value of mysql row/column....
    ...copy code from lucene...
    }.


    import java.sql.*;

    public class my_db {

    public Connection conn = null;
    public Statement stmt = null;
    public boolean loaded = false;

    public boolean load() {
    try {
    // The newInstance() call is a work around for some
    // broken Java implementations

    Class.forName("com.mysql.jdbc.Driver");
    return true;
    } catch (Exception ex) {

    System.out.println("Cannot load mysql driver.");
    return false;
    // handle the error
    }

    }

    public boolean connect() {
    if(loaded == false) {
    loaded = load();
    }

    if(loaded == false) {
    System.out.println("Can't load driver.");
    return false;
    }
    try {
    conn = DriverManager.getConnection("jdbc:mysql://ip:port/dbname?user=user&password=pass");

    stmt = conn.createStatement();
    stmt.executeQuery("SET NAMES 'utf8'");

    return true;
    }
    catch (SQLException ex) {
    // handle any errors
    System.out.println("SQLException: " + ex.getMessage());
    System.out.println("SQLState: " + ex.getSQLState());
    System.out.println("VendorError: " + ex.getErrorCode());
    return false;
    }
    }

    public ResultSet query(String sql) {
    try {
    return stmt.executeQuery(sql);
    }
    catch (SQLException ex) {
    // handle any errors
    System.out.println("SQLException: " + ex.getMessage());
    System.out.println("SQLState: " + ex.getSQLState());
    System.out.println("VendorError: " + ex.getErrorCode());
    return null;
    }
    }


    }



    On Wednesday, July 13, 2005, at 05:23AM, Klaus Hubert wrote:

    Hi Xing,

    I have the book and as I wrote in my initial message I
    managed to create the
    sample index as well managed to read mySQL. But I seem
    to be not able to
    combine those programs :-( I'm very new to Java and I
    haven't found a nice
    Debugger so far to go step by step through my code. I
    will try today all day
    to get this fixed. I know, it shouldn't be too
    difficult.

    Thank you,

    Klaus

    -----Original Message-----
    From: Xing Li
    Sent: Wednesday, July 13, 2005 2:15 PM
    To: java-user@lucene.apache.org
    Subject: RE: SIMPLE Lucene / MySQL Indexer

    Don't make the mistake of complicating the task. Just
    read straight from
    mysql into lucene via java. There is no benefit of
    exporting data to xml
    just to regrab the data back into lucene.

    Get the Lucene In actioin book if you haven't cause
    all the samples there
    are real-world practical. Are you need to add is 10
    lines of mysql type
    java/jdbc code and you are ready to create your first
    index. Download luke
    for lucene, GUI testing tool so you can browse the
    index, perform searches,
    validate/test search performan bottlenecks, dissect
    queries, etc.


    On Wednesday, July 13, 2005, at 05:04AM, Klaus Hubert
    wrote:
    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
    http://www-128.ibm.com/developerworks/java/library/j-lucene/.
    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.

    Thanks,

    Klaus

    -----Original Message-----
    From: Ian Lea
    Sent: Wednesday, July 13, 2005 10:19 AM
    To: java-user@lucene.apache.org
    Subject: Re: SIMPLE Lucene / MySQL Indexer

    Something like this?

    IndexWriter iw = whatever
    ResultSet rs = whatever

    while (rs.next()) {
    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"));
    ...
    iw.addDocument(ldoc);
    }

    rs.close();
    iw.close();


    On the IDE front, most people seem to use Eclipse nowadays.

    --
    Ian.

    On 13/07/05, Klaus Hubert <klaus_hubert@yahoo.com>
    wrote:
    Hi,

    I played with several search engines to replace
    MySQL FULLTEXT index
    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:
    java-user-unsubscribe@lucene.apache.org
    For additional commands, e-mail:
    java-user-help@lucene.apache.org



    __________________________________________________
    Do You Yahoo!?
    Tired of spam? Yahoo! Mail has the best spam
    protection around
    http://mail.yahoo.com

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





    ____________________________________________________
    Start your day with Yahoo! - make it your home page
    http://www.yahoo.com/r/hs


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

    ---------------------------------------------------------------------
    To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
    For additional commands, e-mail: java-user-help@lucene.apache.org
  • Karthik N S at Jul 13, 2005 at 1:54 pm
    hI

    Apologies....


    Interesting this is not the Form to discuss about HOW to Debugging with
    Eclipse

    So I suggest u to use the Help tab in Eclispe Ide.

    Hint : First set the Break point on hte code and then use Use the Debug
    tab under Run.



    this is a Lucene Form Guys....


    Karthik



    -----Original Message-----
    From: Klaus Hubert
    Sent: Wednesday, July 13, 2005 5:54 PM
    To: java-user@lucene.apache.org
    Subject: RE: SIMPLE Lucene / MySQL Indexer


    Hi Xing,

    I have the book and as I wrote in my initial message I
    managed to create the
    sample index as well managed to read mySQL. But I seem
    to be not able to
    combine those programs :-( I'm very new to Java and I
    haven't found a nice
    Debugger so far to go step by step through my code. I
    will try today all day
    to get this fixed. I know, it shouldn't be too
    difficult.

    Thank you,

    Klaus

    -----Original Message-----
    From: Xing Li
    Sent: Wednesday, July 13, 2005 2:15 PM
    To: java-user@lucene.apache.org
    Subject: RE: SIMPLE Lucene / MySQL Indexer

    Don't make the mistake of complicating the task. Just
    read straight from
    mysql into lucene via java. There is no benefit of
    exporting data to xml
    just to regrab the data back into lucene.

    Get the Lucene In actioin book if you haven't cause
    all the samples there
    are real-world practical. Are you need to add is 10
    lines of mysql type
    java/jdbc code and you are ready to create your first
    index. Download luke
    for lucene, GUI testing tool so you can browse the
    index, perform searches,
    validate/test search performan bottlenecks, dissect
    queries, etc.


    On Wednesday, July 13, 2005, at 05:04AM, Klaus Hubert
    wrote:
    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
    http://www-128.ibm.com/developerworks/java/library/j-lucene/.
    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.

    Thanks,

    Klaus

    -----Original Message-----
    From: Ian Lea
    Sent: Wednesday, July 13, 2005 10:19 AM
    To: java-user@lucene.apache.org
    Subject: Re: SIMPLE Lucene / MySQL Indexer

    Something like this?

    IndexWriter iw = whatever
    ResultSet rs = whatever

    while (rs.next()) {
    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"));
    ...
    iw.addDocument(ldoc);
    }

    rs.close();
    iw.close();


    On the IDE front, most people seem to use Eclipse nowadays.

    --
    Ian.
    On 13/07/05, Klaus Hubert wrote:
    Hi,

    I played with several search engines to replace
    MySQL FULLTEXT index
    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:
    java-user-unsubscribe@lucene.apache.org
    For additional commands, e-mail:
    java-user-help@lucene.apache.org



    __________________________________________________
    Do You Yahoo!?
    Tired of spam? Yahoo! Mail has the best spam
    protection around
    http://mail.yahoo.com

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





    ____________________________________________________
    Start your day with Yahoo! - make it your home page
    http://www.yahoo.com/r/hs


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


    ---------------------------------------------------------------------
    To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
    For additional commands, e-mail: java-user-help@lucene.apache.org
  • Klaus Hubert at Jul 13, 2005 at 8:05 pm
    Hi,

    Thank you all so much for the crash course in Java for
    Beginners. Indeed the
    last time I used java was 1996... Lol. But I'm getting
    now very close. It is
    all about the right declarations of classes and
    includes at the correct
    location. I have almost done it. I will publish my
    code to the community if
    somebody is interested.

    Bye,

    Klaus

    -----Original Message-----
    From: Xing Li
    Sent: Wednesday, July 13, 2005 2:38 PM
    To: java-user@lucene.apache.org
    Subject: RE: SIMPLE Lucene / MySQL Indexer

    Kalus,

    Just a few days ago I couldn't even remember how to
    compile java code. Last
    time I touched java was like 2001. Don't worry, Lucene
    is extremely easy,
    once you know a bit of fund java. It's no different
    than any other language.
    Just syntax. I recommend Java from Deitel & Deitel.
    Fell in love with their
    practical written style back in college.

    Below is what I whipped up quick to test mysql
    connections...

    Just add the following to an lucene book sample. You
    need to download
    ConnectJ jdbc driver from mysql site and put the jar
    file in your path
    variable.

    my_db db = new my_db();
    db.connect();

    ResultSet = rs;

    rs = db.query("select * from mytable limit 100");

    whiel(rs.next()) {
    ....... = rs.getString("mysqltablefieldname");
    //return string value of
    mysql row/column....
    ...copy code from lucene...
    }.


    import java.sql.*;

    public class my_db {

    public Connection conn = null;
    public Statement stmt = null;
    public boolean loaded = false;

    public boolean load() {
    try {
    // The newInstance() call is a
    work around for some
    // broken Java implementations


    Class.forName("com.mysql.jdbc.Driver");
    return true;
    } catch (Exception ex) {

    System.out.println("Cannot
    load mysql driver.");
    return false;
    // handle the error
    }

    }

    public boolean connect() {
    if(loaded == false) {
    loaded = load();
    }

    if(loaded == false) {
    System.out.println("Can't load
    driver.");
    return false;
    }
    try {
    conn =
    DriverManager.getConnection("jdbc:mysql://ip:port/dbname?user=user&password=
    pass");

    stmt = conn.createStatement();
    stmt.executeQuery("SET NAMES
    'utf8'");

    return true;
    }
    catch (SQLException ex) {
    // handle any errors

    System.out.println("SQLException: " +
    ex.getMessage());
    System.out.println("SQLState:
    " + ex.getSQLState());

    System.out.println("VendorError: " +
    ex.getErrorCode());
    return false;
    }
    }

    public ResultSet query(String sql) {
    try {
    return stmt.executeQuery(sql);
    }
    catch (SQLException ex) {
    // handle any errors

    System.out.println("SQLException: " +
    ex.getMessage());
    System.out.println("SQLState:
    " + ex.getSQLState());

    System.out.println("VendorError: " +
    ex.getErrorCode());
    return null;
    }
    }


    }




    On Wednesday, July 13, 2005, at 05:23AM, Klaus Hubert
    wrote:
    Hi Xing,

    I have the book and as I wrote in my initial message
    I managed to
    create the sample index as well managed to read
    mySQL. But I seem to be
    not able to combine those programs :-( I'm very new
    to Java and I
    haven't found a nice Debugger so far to go step by
    step through my
    code. I will try today all day to get this fixed. I
    know, it shouldn't
    be too difficult.

    Thank you,

    Klaus

    -----Original Message-----
    From: Xing Li
    Sent: Wednesday, July 13, 2005 2:15 PM
    To: java-user@lucene.apache.org
    Subject: RE: SIMPLE Lucene / MySQL Indexer

    Don't make the mistake of complicating the task. Just
    read straight
    from mysql into lucene via java. There is no benefit
    of exporting data
    to xml just to regrab the data back into lucene.

    Get the Lucene In actioin book if you haven't cause
    all the samples
    there are real-world practical. Are you need to add
    is 10 lines of
    mysql type java/jdbc code and you are ready to create
    your first index.
    Download luke for lucene, GUI testing tool so you can
    browse the index,
    perform searches, validate/test search performan
    bottlenecks, dissect
    queries, etc.


    On Wednesday, July 13, 2005, at 05:04AM, Klaus Hubert
    wrote:
    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
    http://www-128.ibm.com/developerworks/java/library/j-lucene/.
    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.

    Thanks,

    Klaus

    -----Original Message-----
    From: Ian Lea
    Sent: Wednesday, July 13, 2005 10:19 AM
    To: java-user@lucene.apache.org
    Subject: Re: SIMPLE Lucene / MySQL Indexer

    Something like this?

    IndexWriter iw = whatever
    ResultSet rs = whatever

    while (rs.next()) {
    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"));
    ...
    iw.addDocument(ldoc);
    }

    rs.close();
    iw.close();


    On the IDE front, most people seem to use Eclipse nowadays.

    --
    Ian.

    On 13/07/05, Klaus Hubert <klaus_hubert@yahoo.com>
    wrote:
    Hi,

    I played with several search engines to replace
    MySQL FULLTEXT index
    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:
    java-user-unsubscribe@lucene.apache.org
    For additional commands, e-mail:
    java-user-help@lucene.apache.org



    __________________________________________________
    Do You Yahoo!?
    Tired of spam? Yahoo! Mail has the best spam
    protection around
    http://mail.yahoo.com

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





    ____________________________________________________
    Start your day with Yahoo! - make it your home page
    http://www.yahoo.com/r/hs


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



    __________________________________________________
    Do You Yahoo!?
    Tired of spam? Yahoo! Mail has the best spam protection around
    http://mail.yahoo.com

    ---------------------------------------------------------------------
    To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
    For additional commands, e-mail: java-user-help@lucene.apache.org
  • Klaus Hubert at Jul 13, 2005 at 8:06 pm
    Yes, it works with breakpoints and so on, but the
    current line is never
    highlighted. All I see where it is the line number in
    the debug window. But
    you are right, this is no Java Forum and I apologize
    for beginners
    questions.

    -----Original Message-----
    From: Karthik N S
    Sent: Wednesday, July 13, 2005 2:41 PM
    To: java-user@lucene.apache.org
    Subject: RE: SIMPLE Lucene / MySQL Indexer


    hI

    Apologies....


    Interesting this is not the Form to discuss about HOW
    to Debugging with
    Eclipse

    So I suggest u to use the Help tab in Eclispe Ide.

    Hint : First set the Break point on hte code and
    then use Use the Debug
    tab under Run.



    this is a Lucene Form Guys....


    Karthik



    -----Original Message-----
    From: Klaus Hubert
    Sent: Wednesday, July 13, 2005 5:54 PM
    To: java-user@lucene.apache.org
    Subject: RE: SIMPLE Lucene / MySQL Indexer


    Hi Xing,

    I have the book and as I wrote in my initial message I
    managed to create the
    sample index as well managed to read mySQL. But I seem
    to be not able to
    combine those programs :-( I'm very new to Java and I
    haven't found a nice
    Debugger so far to go step by step through my code. I
    will try today all day
    to get this fixed. I know, it shouldn't be too
    difficult.

    Thank you,

    Klaus

    -----Original Message-----
    From: Xing Li
    Sent: Wednesday, July 13, 2005 2:15 PM
    To: java-user@lucene.apache.org
    Subject: RE: SIMPLE Lucene / MySQL Indexer

    Don't make the mistake of complicating the task. Just
    read straight from
    mysql into lucene via java. There is no benefit of
    exporting data to xml
    just to regrab the data back into lucene.

    Get the Lucene In actioin book if you haven't cause
    all the samples there
    are real-world practical. Are you need to add is 10
    lines of mysql type
    java/jdbc code and you are ready to create your first
    index. Download luke
    for lucene, GUI testing tool so you can browse the
    index, perform searches,
    validate/test search performan bottlenecks, dissect
    queries, etc.


    On Wednesday, July 13, 2005, at 05:04AM, Klaus Hubert
    wrote:
    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
    http://www-128.ibm.com/developerworks/java/library/j-lucene/.
    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.

    Thanks,

    Klaus

    -----Original Message-----
    From: Ian Lea
    Sent: Wednesday, July 13, 2005 10:19 AM
    To: java-user@lucene.apache.org
    Subject: Re: SIMPLE Lucene / MySQL Indexer

    Something like this?

    IndexWriter iw = whatever
    ResultSet rs = whatever

    while (rs.next()) {
    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"));
    ...
    iw.addDocument(ldoc);
    }

    rs.close();
    iw.close();


    On the IDE front, most people seem to use Eclipse nowadays.

    --
    Ian.
    On 13/07/05, Klaus Hubert wrote:
    Hi,

    I played with several search engines to replace
    MySQL FULLTEXT index
    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:
    java-user-unsubscribe@lucene.apache.org
    For additional commands, e-mail:
    java-user-help@lucene.apache.org



    __________________________________________________
    Do You Yahoo!?
    Tired of spam? Yahoo! Mail has the best spam
    protection around
    http://mail.yahoo.com

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





    ____________________________________________________
    Start your day with Yahoo! - make it your home page
    http://www.yahoo.com/r/hs


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


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



    __________________________________________________
    Do You Yahoo!?
    Tired of spam? Yahoo! Mail has the best spam protection around
    http://mail.yahoo.com

    ---------------------------------------------------------------------
    To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
    For additional commands, e-mail: java-user-help@lucene.apache.org
  • Klaus Hubert at Jul 13, 2005 at 8:10 pm
    Hi Chris,

    I've not thought about that. I'm almost done with my
    program and I will give
    yours also a try as suggested. I have the lasest
    (recommended) JDBC 3.1.10.
    But I still have to download and install Tomcat or
    similar to run your .war
    file. I think 5-24h is not that bad, since you can
    update the Lucene index
    in future and not go over this long building time
    again. Your demo looks
    really nice and its fast. Congratulations!

    Bye,

    Klaus

    -----Original Message-----
    From: Chris Lu
    Sent: Wednesday, July 13, 2005 5:47 PM
    To: java-user@lucene.apache.org
    Subject: Re: SIMPLE Lucene / MySQL Indexer

    Hi, Klaus, thanks.

    You can simply use DBSight to create the index. It's
    in Lucene's standard
    format.
    And you can control index field type, analyzers, how
    to select data from
    database, number of java threads, etc, just by web UI.
    No coding is needed.
    We have a user who didn't know Lucene at all, and have
    3 database searches
    up and running in one week.

    To index a huge index, say 1 million records, it may
    take 5 ~ 24 hours
    depends on the record size, computer size, etc.
    Actually most of the time is
    spent on JDBC pulling the data.

    Special warning: MySQL's JDBC driver has a bug leading
    to OutOfMemory if you
    do a select with lots of rows. You must download the
    latest JDBC(dev
    version) and use setFetchSize().

    Chris
    ---
    Full-Text Search on Any Database
    http://www.dbsight.net
    On 7/13/05, Klaus Hubert wrote:
    Hi Chris,

    this is indeed a cool application, but I need just
    to create the
    index. I definitely will look into your file and see
    if it makes my
    life easier. Can you tell any details how long it
    took to create such
    a huge index? What experiences you have with the
    slowest search? Does
    it go over 1 second? (I know, it depends on the
    hardware, but I'm just
    wondering)

    Thanks,

    Klaus

    -----Original Message-----
    From: Chris Lu
    Sent: Wednesday, July 13, 2005 5:04 AM
    To: java-user@lucene.apache.org
    Subject: Re: SIMPLE Lucene / MySQL Indexer

    Please allow me to intraduce DBSight.
    It's based on Lucene, oriented for Any database search.
    Most of the things are done by web UI. No coding is
    needed to create
    your search.
    check out this demo. http://search.dbsight.com

    It's free to download and test. Free for developer
    edition, non-profit
    usage.

    Chris Lu
    ---
    Full-Text Search on Any Database
    http://www.dbsight.net

    Klaus Hubert wrote:
    Hi,

    I played with several search engines to replace
    MySQL
    FULLTEXT index
    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

    __________________________________________________
    Do You Yahoo!?
    Tired of spam? Yahoo! Mail has the best spam
    protection around
    http://mail.yahoo.com
    ---------------------------------------------------------------------
    To unsubscribe, e-mail:
    java-user-unsubscribe@lucene.apache.org
    For additional commands, e-mail:
    java-user-help@lucene.apache.org


    --
    Chris Lu
    --------------
    Free-Text Search on Any Database
    http://www.dbsight.net


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





    ____________________________________________________
    Start your day with Yahoo! - make it your home page
    http://www.yahoo.com/r/hs


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

    --
    Chris Lu
    ---------------------
    Full-Text Search on Any Database
    http://www.dbsight.net

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





    ____________________________________________________
    Start your day with Yahoo! - make it your home page
    http://www.yahoo.com/r/hs


    ---------------------------------------------------------------------
    To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
    For additional commands, e-mail: java-user-help@lucene.apache.org
  • Sven Duzont at Jul 13, 2005 at 11:08 pm
    .................................
    i thought it was a lucene user list, not a dbsight one

    --- sven


    Le mercredi 13 juillet 2005 à 17:47:14, vous écriviez :



    CL> Hi, Klaus, thanks.



    CL> You can simply use DBSight to create the index. It's in Lucene's

    CL> standard format.

    CL> And you can control index field type, analyzers, how to select data

    CL> from database, number of java threads, etc, just by web UI. No coding

    CL> is needed. We have a user who didn't know Lucene at all, and have 3

    CL> database searches up and running in one week.



    CL> To index a huge index, say 1 million records, it may take 5 ~ 24 hours

    CL> depends on the record size, computer size, etc. Actually most of the

    CL> time is spent on JDBC pulling the data.



    CL> Special warning: MySQL's JDBC driver has a bug leading to OutOfMemory

    CL> if you do a select with lots of rows. You must download the latest

    CL> JDBC(dev version) and use setFetchSize().



    CL> Chris

    CL> ---

    CL> Full-Text Search on Any Database

    CL> http://www.dbsight.net








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

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupjava-user @
categorieslucene
postedJul 12, '05 at 11:43p
activeJul 13, '05 at 11:08p
posts16
users7
websitelucene.apache.org

People

Translate

site design / logo © 2022 Grokbase