Solved

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

Posted on 2009-06-30
1
447 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

APEX (Application Express) is used to develop a web application from Oracle. SQL Workshop is one of the tools that comes with Oracle APEX to query or modify the database objects or to make any changes to the structure.
Recently I spent hours debugging an issue in a Rails project where ActiveRecord was causing MySQL errors trying to create a User object of a class at the top level of a Single Table Inheritance model structure.  It turns out `.create` behaves differ…
The purpose of this video is to demonstrate how to set up the WordPress backend so that each page automatically generates a Mailchimp signup form in the sidebar. This will be demonstrated using a Windows 8 PC. Tools Used are Photoshop, Awesome…
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…

914 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

23 Experts available now in Live!

Get 1:1 Help Now