个性化阅读
专注于IT技术分析

Magento 2 Elasticsearch Catalog Search索引器处理未知错误:除非将include_type_name参数设置为true,否则无法在放置映射请求中提供类型

点击下载

在对Magento 2中的产品目录重新编制索引期间, 请使用终端:

php bin/magento indexer:reindex

Catalog Search索引器过程将引发Elasticsearch错误:

Catalog Search indexer process unknown error:
{  
   "error":{  
      "root_cause":[  
         {  
            "type":"illegal_argument_exception", "reason":"Types cannot be provided in put mapping requests, unless the include_type_name parameter is set to true."
         }
      ], "type":"illegal_argument_exception", "reason":"Types cannot be provided in put mapping requests, unless the include_type_name parameter is set to true."
   }, "status":400
}

此问题是由于在Magento 2中使用了不受支持的Elasticsearch版本引起的。例如, 通常会在安装Elasticsearch 7.x时发生, 但直到Magento仅支持5.x和6.x版本为止。

直到目前为止, 防止此异常出现在Magento 2的当前版本中的唯一解决方案是仅使用官方支持的Elasticsearch版本(6.x或5.x)。如果你使用的是Elasticsearch的最新版本, 例如magento不支持的7.x, 则每次重建搜索索引时都会出现该异常。

编码愉快!

赞(0)
未经允许不得转载:srcmini » Magento 2 Elasticsearch Catalog Search索引器处理未知错误:除非将include_type_name参数设置为true,否则无法在放置映射请求中提供类型

评论 抢沙发

评论前必须登录!