aspose file tools*
The moose likes Servlets and the fly likes designing a serch engine Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "designing a serch engine" Watch "designing a serch engine" New topic
Author

designing a serch engine

paluri chandra
Greenhorn

Joined: Dec 03, 2005
Posts: 4
Hi all,
I have designed a web based application using jsp,servlets & database as oracle.Now i want to have a search engine that can access tables in my database and retrieve the records.For example the user may perform search using name,emailid,phone number etc.
Please suggest how to proceed.
Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17257
    
    6

Well, I think Lucene is for searching the pages, not the database.

But you could create a Form to take the users criteria, call a Servlet passing that criteria and the table to search on, and have a general Object that takes that information creates an SQL query and use JDBC.

Now, that is the down and dirty way, there are frameworks for this type of application, like Struts, AJAX (to do the search without refreshing the apge, if you need that), JSF, Ruby on Rails.

Hope that helps

Mark


Perfect World Programming, LLC - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
Stan James
(instanceof Sidekick)
Ranch Hand

Joined: Jan 29, 2003
Posts: 8791
You could use Lucene to "index" anything. With the API you feed it one "document" at a time. You could retrieve each database record, make a document, index it with its primary key and then use Lucene to search and get back the key. It doesn't sound real slick though; duplication of database data in an external index that you have to keep in sync doesn't feel right.

If you can get by with the database queries described above it would be a lot cleaner.


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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: designing a serch engine