i have large innodb database on 2 million products on it. 'products' table has following fields: id,title,description,category.
there myisam table called 'category' contains list of categories used on website. has following fields: id,name,keywords,parentid.
my question more logic rather code, trying achieve follows:
when user lists new product on site, typing description should try work out category put product in (with accuracy).
i tried using mysql match() match entered title against list of keywords in category table, far accurate.
a better idea seems to match user entered title against titles products in database, grouping them category in , sorting them largest group. however, on innodb database can't use fulltext, , 2mill items think pretty slow anyway?
how - guess need similar way how stackoverflow displays similar questions?
a fulltext index on 2 million records valid option, if running on decent server. inital indexing take while, that's sure, searches should reasonably fast, mysql can take it.
innodb supports fulltext indexes of v5.6.4. should consider upgrading.
if upgrading not option, please see this previous answer of mine suggest workaround.
for use case, may want take @ with query expansion option:
it works performing search twice, search phrase second search original search phrase concatenated few highly relevant documents first search. thus, if 1 of these documents contains word “databases” , word “mysql”, second search finds documents contain word “mysql” if not contain word “database”
Comments
Post a Comment