Hi, I need a Java (J2EE) based (hopefuly open source) search engine to search MySQL database. I don't want to do like searches since I need the search results to be ordered from best to worst.
Anybody knows such product? Thanks.
Joined: Jan 29, 2003
I don't know any way to do it IN the database, but you can do it outside the database with something like Lucene. You'd have an index step where you build a document for each entity in your database and index the document in Lucene. A search in Lucene will give you back the document name. Give the document a name that includes a primary key so you can retrieve the row again. You'd need a way to re-index any row that changed.
If the whole purpose of your database is to facilitate searches, you might consider scrapping the database for a bunch of flat files indexed through Lucene. I have to admit that would be a rare application scenario, but one I'm real tempted to use myself for a read-only archive.
A good question is never answered. It is not a bolt to be tightened into place but a seed to be planted and to bear more seed toward the hope of greening the landscape of the idea. John Ciardi
Paul Santa Maria
Joined: Feb 24, 2004
I know mySQL supports full-text search; I believe you should be able to do this through your JDBC driver: