解決方案
若要修正此問題,您需要將is_filterable
(即用於分層導覽)和filterable_in_search
(即用於搜尋結果分層導覽)設定為「0」(未使用)。 若要這麼做,請執行下列步驟:
-
建立資料庫備份。
-
使用資料庫工具,例如phpMyAdmin,或從命令列手動存取資料庫以執行下列SQL查詢:
UPDATE catalog_eav_attribute AS cea INNER JOIN eav_attribute AS ea ON ea.attribute_id = cea.attribute_id SET cea.is_filterable = 0, cea.is_filterable_in_search = 0 WHERE (cea.is_filterable = 1 OR cea.is_filterable_in_search = 1) AND frontend_input NOT IN ('boolean', 'multiselect', 'select', 'price');
-
使用下列命令執行「目錄搜尋」完整重新索引:
bin/magento indexer:reindex catalogsearch_fulltext
-
執行以清除快取
bin/magento cache:clean
或在Commerce管理員中的 系統 > 工具 > 快取管理 下。
現在您應該能夠執行目錄搜尋而不會發生問題。
recommendation-more-help