标签:style blog color io os ar for strong 文件
在MAGENTO的快速搜索中往往得不到好的结果,要嘛是查询不到产品,要嘛是所有产品都列出来,不像高级搜索结果那样理想。 有没有把快速搜索效率提高到高级搜索那个水平呢,可以按下面方法做:
UPDATE catalog_eav_attribute SET is_searchable = 0;
This will set all product attributes to “Use in Quick Search” => NO.
UPDATE catalog_eav_attribute SET is_searchable = 1 WHERE attribute_id = (SELECT attribute_id FROM eav_attribute WHERE attribute_code = "name" AND entity_type_id = (SELECT entity_type_id FROM eav_entity_type WHERE entity_type_code = "catalog_product"));
This will set only the “name” attribute to “Use in Quick Search” => YES, which is sort of the whole point of this article, having one or minimal set of searchable attributes to get more precise result set.
DELETE FROM catalogsearch_query; DELETE FROM catalogsearch_fulltext;
This will clear all previously built search query.
You can easily make an extension for switching Magento between its OR and your AND statement, have it exposed as configuration value under System > Configuration > Catalog > Catalog > Catalog Search > OR/AND.(此处可以修改搜索条件为OR还是AND,也就是LIKE/FULLTXT,试试会有不同结果)
Hope this helps.
标签:style blog color io os ar for strong 文件
原文地址:http://www.cnblogs.com/qq9915072/p/4028523.html