Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

designing a serch engine

 
paluri chandra
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Stan James
(instanceof Sidekick)
Ranch Hand
Posts: 8791
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic