I am building a very simple product catalog that will store products inside mysql table and I want to search products as fast as possible (and as relevant as possible). The products database will be quite large (about 500.000 products) which is why searches using "like" that are not using indexes are very slow.
I have many fields but the only ones I want to search are:
I tried experimenting with fulltext search but there were some problems:
What would be the best way to do searches on this table like this? The only way that gives results that are good in my case is splitting the query string and querying multiple queries using "like" operator for every string and somehow calculate the weight but this solution works very slow (even more than 15 seconds for a single query which is too slow).
I don't expect everything to be possible using only single query but I am looking for a solution that would be fast and as relevant as possible. If this means building some kind of custom word index or similar I am also willing to do this, I just need an idea how to manage this?
thank you!
我们将搜索迁移到Sphinx。现在,我们需要微调结果。
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.