aspose file tools*
The moose likes Servlets and the fly likes Keyword based Search program for JAVA 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 "Keyword based Search program for JAVA" Watch "Keyword based Search program for JAVA" New topic
Author

Keyword based Search program for JAVA

Ken Shamrock
Ranch Hand

Joined: Jan 23, 2002
Posts: 139
Suppose my database has the following entries/data:
1. Do you smoke often?
2. When was the last time you smoked?
3. Have you had any problems related to smoking?
4. When was the first time you smoked?
And if the user did a keyword search on the word "smoke", I want the search tool to return all the above entries, since they are "related" to "smoke". I want an advanced version of the "like query of SQL" so that I can search for related terms! Same goes, if the user searches for the keyword "smoking", then entries with the word "smoke" must also be returned in addition to those containing "smoking" and "smoked".
Can somebody direct me to any code that can do this, or a JAVA based tool/program that performs this function?
Thanks in advance


Thanks everyone who helped me
Peter den Haan
author
Ranch Hand

Joined: Apr 20, 2000
Posts: 3252
If your database platform is Oracle, you could use Context Search. A completely different approach would be to use Apache Lucene.
- Peter
Younes Essouabni
Ranch Hand

Joined: Jan 13, 2002
Posts: 479
Hello,
I have a question related to yours.
If I want my website to have a keyword search. What is the usual approach. Do we put only the questions in the database (with a link to the answer), or do we put the questions and the answers in the database? How does people get their entire webSite "researchable"? Do they put all the contents of their html page in a database?
Thx in advance for your answer.


Younes
By constantly trying one ends up succeeding. Thus: the more one fails the more one has a chance to succeed.
The Moose
Bartender

Joined: Apr 01, 2003
Posts: 73
Originally posted by Ken Shamrock:
Suppose my database has the following entries/data:
1. Do you smoke often?
2. When was the last time you smoked?
3. Have you had any problems related to smoking?
4. When was the first time you smoked?


You need to add
5. Are you a Moose?


Finally! Animal rights in action!
Michael Morris
Ranch Hand

Joined: Jan 30, 2002
Posts: 3451
6. Are you a smoking Moose?


Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius - and a lot of courage - to move in the opposite direction. - Ernst F. Schumacher
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Keyword based Search program for JAVA