Solved

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

Posted on 2006-06-29
5
933 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
5 Comments
 
LVL 14

Accepted Solution

by:
sathyagiri earned 168 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 166 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 166 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

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Introduction: I have seen many questions on EE and elsewhere, asking about how to find either gaps in lists of numbers (id field, usually) ranges of values or dates overlapping date ranges combined date ranges I thought it would be a good …
Shadow IT is coming out of the shadows as more businesses are choosing cloud-based applications. It is now a multi-cloud world for most organizations. Simultaneously, most businesses have yet to consolidate with one cloud provider or define an offic…
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…
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…

707 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now