Solved

How can I search a MYSQL database for names while accounting for spelling mistakes?

Posted on 2009-06-30
1
446 Views
Last Modified: 2012-05-07
I have a rails app that makes use of user profiles.  I want to let users search for profiles by name.  If a user miss-spells a name the search should sill return the name.  I'm not looking for something too complicated (a rails plug-in would be ideal) but .Find(:name like ?, '%' + param[:search] + '%') just isn't enough.  I would like something a little smarter.  Are there any standard algorithms for this kind of search?  Should I use a regex?

Ideally, if a user exists with the last name smith and someone searches for smigh, I'd like to return smith.  If this isn't possible then I can live with what I got.
0
Comment
Question by:skm376
1 Comment
 
LVL 46

Accepted Solution

by:
tbsgadi earned 500 total points
ID: 24752345
0

Featured Post

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

There is a huge demand for CodeIgniter among the PHP web developers due to its dynamic features and benefits these days. It is one of most popular and agile open source PHP framework for creating robust web applications in PHP web development field.…
Creating and Managing Databases with phpMyAdmin in cPanel.
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…

746 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

13 Experts available now in Live!

Get 1:1 Help Now