?
Solved

Optimize Search Query for considering singular, plural and suggest words like Google

Posted on 2006-06-29
5
Medium Priority
?
994 Views
Last Modified: 2008-03-10
Hi,

How do I make a search query to include both singular and plural in a single query. Giving the query using: like '%  %' does not help here. If i give either "House" or "Houses" in my search criteria, it should search for both "House" and "Houses" in the database.

Also, how do I achieve something like that in Google. When we type something wrong, it asks for "Do you mean ....... to search".

Thanks
0
Comment
Question by:akshay_sumeru
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
5 Comments
 
LVL 14

Accepted Solution

by:
sathyagiri earned 672 total points
ID: 17009053
You could use some thing like

select * from <tname> where column_name = 'HOUSE' or column_name like 'HOUSE_';

For auto suggesting you could probably do something like

select * from <tname> where column_name like 'H%';  (you could change H% to HO% or anything else)

Whatever the result of the above query is you could display to the user and ask them to select one.

0
 
LVL 3

Assisted Solution

by:cdemir
cdemir earned 664 total points
ID: 17009906
>>Also, how do I achieve something like that in Google. When we type something wrong, it asks >>for "Do you mean ....... to search".

you can use SOUNDEX function fot this facility.
0
 
LVL 75

Assisted Solution

by:Anthony Perkins
Anthony Perkins earned 664 total points
ID: 17015080
It really depends on your database.  If it is MS SQL Server you would use Full-Text Search for that.
0

Featured Post

Moving data to the cloud? Find out if you’re ready

Before moving to the cloud, it is important to carefully define your db needs, plan for the migration & understand prod. environment. This wp explains how to define what you need from a cloud provider, plan for the migration & what putting a cloud solution into practice entails.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Recently, Microsoft released a best-practice guide for securing Active Directory. It's a whopping 300+ pages long. Those of us tasked with securing our company’s databases and systems would, ideally, have time to devote to learning the ins and outs…
Recently I was talking with Tim Sharp, one of my colleagues from our Technical Account Manager team about MongoDB’s scalability. While doing some quick training with some of the Percona team, Tim brought something to my attention...
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …

801 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question