I am creating price comparison website in php and mysql. so i need to find similar products and map it to create price comparison table. In my database 10,000+ products are available, so to find similar products i have create mysql fulltext index in product name and description columns and compare product with other products, but i can't get desire result, for example if i Search
Search for "Samsung Galaxy A7 (2017) 32gb", get results:
Note: In result set only first two and fourth product is similar, not other are
Now, i have question:
How to find important keyword from search query, so that keyword are required at least in other product to know similarity? for example in above search query "Samsung Galaxy A7" is important keyword, and that should be required in other product in result. We Human can know, "Samsung Galaxy A7" is important keyword from "Samsung Galaxy A7 (2017) 32gb" to compare with other products, but how can know computer program?
There is any algorithm to compare similar product by important keyword as like sift algorithm in image comparison.
If you have any good method to find similar products, please suggest me
Take a look around Elasticsearch which is a search engine.
It can do keyword search and return result by score.
You can boost or minus score in some ways, but it is not smart enough to determine the Keywords like Human.
However, it can determine common terms in your documents (such as 'the', 'a'...or '32gb' if there are many models using this term.) and adjust the score of those common terms to lower score. (ES common terms query)
Elasticsearch is powerful (so as its complication), it could have many better solutions to this subject.
Edit: A good article about "common terms query" and "stopwords list". stopwords can exclude the specs permanently if that's the case you want. Sometimes, "common terms query" won't work if the record data is not broad enough. (ex: Samsung Galaxy is more frequent than 32gb)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With