Search code examples
sqlmysqlsoundex

Suggestion For Finding Similar Rows In Mysql


i want select similar rows accourding to row's title columun. Title columun has mostly have 5 or 6 six keywords. Which algorithm do you recommend ? Soundex Maybe ?

P.S: Title columun has unicode chracters like Ç, Ö, Ş...


Solution

  • My question's answer mysql full text search. Also it supports unicode.

        SELECT *, match(project_title) against('sample project 55') as similarity
        FROM projects
        WHERE status IN(1, 2, 3, 4, 5, 6) AND id != ? AND match('sample project 55') against(?)
        ORDER BY similarity DESC