File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Keyword based Search program for JAVA

 
Ken Shamrock
Ranch Hand
Posts: 139
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Peter den Haan
author
Ranch Hand
Posts: 3252
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 479
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
The Moose
Bartender
Posts: 73
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
Michael Morris
Ranch Hand
Posts: 3451
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
6. Are you a smoking Moose?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic