• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Keyword based Search program for JAVA

 
Ranch Hand
Posts: 139
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
author
Posts: 3252
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 479
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Bartender
Posts: 73
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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?
 
Ranch Hand
Posts: 3451
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
6. Are you a smoking Moose?
 
It's hard to fight evil. The little things, like a nice sandwich, really helps. Right tiny ad?
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic