I am having a table ‘question’ with following columns:
- ID (primary key)
- title (Question subject/title)
- body (Question details)
Now say if user is asking a question, and as soon he finishes his title, I actually fire an event to get questions available similar to this title.
Now how can I am match user’s input (title) to existing titles in question table and get the similar ones out?
I am using MySql Db. Please help me with this.
Perhaps the Levenshtein distance?
Helper function:
(From http://www.artfulsoftware.com/infotree/queries.php#552), common mysql queries
Or you could use “LIKE” with generous wildcards, would be simpler
If you deem the body to be relevent as well,