先确认问题层级

中文Store搜索结果出现英文名称或英文属性标签,直接访问商品页却正常。搜索索引可能在错误Store上下文中构建。

对同一SKU查询默认范围与目标store_id的name、description和参与搜索属性值,确认源数据存在。

检查catalogsearch_fulltext为每个Store建立的索引/alias,Cron运行时不能被自定义代码强制切到默认Store。

修复方法

  • 自定义数据Mapper应使用传入的storeId加载属性标签,不能从全局StoreManager读取当前后台Store。
  • 修复后仅重建catalogsearch_fulltext并清搜索/FPC缓存,分别用两个Store请求验证。
SELECT store_id,value FROM catalog_product_entity_varchar WHERE entity_id=:entity_id AND attribute_id=:name_attr ORDER BY store_id;bin/magento indexer:reindex catalogsearch_fulltextcurl -sS 'http://opensearch:9200/_cat/aliases?v'

怎样才算解决

相同关键词在中英文Store返回各自名称和标签,切换Store不会读取上一站的搜索文档。