koen Posted May 2, 2008 Share Posted May 2, 2008 Example: searching for string ABCDEFG, and in DB there's string ABCDE and ABC. ABCDE is best match. What sql can I use for this? One option I see but don't really like is searching with WHERE string LIKE abcdefg OR string LIKE abcdef OR ... Quote Link to comment Share on other sites More sharing options...
hitman6003 Posted May 3, 2008 Share Posted May 3, 2008 Fulltext indexing. http://www.mysql.com/fulltext Quote Link to comment Share on other sites More sharing options...
koen Posted May 3, 2008 Author Share Posted May 3, 2008 I've read the section and tried some things. But I don't see how full text search can match a partial word. To give another example: the field contains 1 word for every row row1: possibl row2: possib I want the best match when I search for 'possible' (wich is the field from row 1). Quote Link to comment Share on other sites More sharing options...
mwasif Posted May 4, 2008 Share Posted May 4, 2008 Try using SOUNDEX(). Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.