I've a large table of products, and want to get related products based on a similarity of some kind - whether it is product code or title yet I am yet to decide.
What I want effectively is an output of the 4 most likely matches for a product based on title or code.
Example:
Product Code Related Products
JC83022 JC83021, JC83020, JC83029, JC8300
So I would ideally like a field appended to the product table which does some kind of string matching and returns the codes for the 4 most likely matches.
My idea is that I can use a MySQL query to perform this, but looking around PHP may have some better functions - maybe I could have a function on the product page that returns the products with the nearer levenshein distance - it's just how to query that against a table of over 30,000 products.
Cheers in advance.