浏览文章

文章信息

Magento2.4 elasticsearch 清除影响性能的索引 13762

1、首先,您需要从Elasticsearch切换到MySQL搜索(2.4中此索引不可用)

bin/magento config:set catalog/search/engine 'mysql'

2、查找繁忙黄色索引

curl --silent -X GET localhost:9200/_cat/indices?v

3、删除对应索引

curl -XDELETE localhost:9200/[索引名]

4、切换回Elasticsearch。在设置中重新启用它

bin/magento config:set catalog/search/engine 'Elasticsearch 2'

5、重新索引数据

bin/magento index:reindex

6、通过以下命令检查Elasticsearch索引状态(现在应该为绿色)

curl -m1 localhost:9200/_cluster/health?pretty

原官网:https://support.magento.com/hc/en-us/articles/360039837952-Elasticsearch-Index-Status-is-yellow-or-red-

原创