我找不到在magento 2上进行重组索引的方法。
好像你需要从cronjob运行它.是否有另一种方法可以从后端或命令行重新索引magento 2中的数据,就像以前在Magento 1.x中一样(
php shell/indexer.php -reindexall
)?
- 2019-12-51 #
- 2019-12-52 #
在CLI中运行此命令
php bin/magento indexer:reindex
如果您只想重新索引一个索引器,请编写以下命令:
php bin/magento indexer:reindex indexer_name.
哪里有
indexer_name
可以通过输入以下命令找到:php bin/magento indexer:info
- 2019-12-53 #
以下是使用Magento 2 CLI索引命令完成工作的方法
进入Magento / bin目录中提供的Magento CLI命令文件 cd magento_folder / bin并使用终端或腻子中的magento直接运行你的comamnd。
以下是它如何在Magento 2中进行索引
获取Magento 2中可用索引器的列表php bin/magento indexer:info
以下命令将为您提供所有索引器的状态,无论是索引还是准备好。
php bin/magento indexer:status
您还可以查看单个索引器的状态:假设我想检查catalog_category_product的状态
php bin/magento indexer:status catalog_category_product
php bin/magento indexer:reindex
如果您填写内存限制,请尝试此命令
php bin/magento -dmemory_limit=2G magento indexer:reindex
- 2019-12-54 #
使用Magento CLI.跑
php bin/magento indexer:reindex
来自项目根目录。 - 2019-12-55 #
如果有任何索引循环您可以使用
重置所有索引indexer:reset
点击 然后使用普通的reindex
重新索引magento 2,转到CLI然后 magento安装的根文件夹并运行以下命令: