Link to home
Start Free TrialLog in
Avatar of nrpg666
nrpg666Flag for Bulgaria

asked on

Closest match in MySQL by few keywords

I have text field with some keywords in it (with fulltext index) and some rows... I want to ask mysql to give me the best 10 rows containing words closest to some keywords

Example:
Rows: 1: "googlee ggooogle google" 2: "googgle yahhoo msn" 3: "some other keywords"
I ask for best matches with "google yahoo" and mysql should give me only row 2.
Avatar of theGhost_k8
theGhost_k8
Flag of India image

check for sounds like or soundex functions
Avatar of nrpg666

ASKER

soundex doesn't work with cyrilic
Soundex is also optimized for names and may behave unexpected for general pattern matching.

Sorry, nothing you can do in MySQL.

You need to solve this problem programatically.
Avatar of array007
array007

explode() the rows
make an array of search terms
loop through each row for a match
ASKER CERTIFIED SOLUTION
Avatar of allmer
allmer
Flag of Türkiye image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial