两张方法重新索引
(1)使用cron作业,这是首选,因为索引每分钟运行一次。
(2)使用magento indexer:reindex [indexer]命令重新索引选定的索引器或所有索引器,仅一次
shell命令进入项目文件根目录,再进入bin目录下:
命令为: php magento indexer:reindex 索引名称
索引名称对应的表为
索引器名称 | 索引器方法名称 | 描述 | 命令 |
---|---|---|---|
Design Config Grid / 设计配置网格 | design_config_grid | 重新生成设计配置网格索引 | php magento indexer:reindex design_config_grid |
Customer Grid / 客户网格 | customer_grid | 重新生成客户网格索引 | php magento indexer:reindex customer_grid |
Category products / 分类产品 / 类别产品 | catalog_category_product | 索引类别 | php magento indexer:reindex catalog_category_product |
Product categories / 产品类别 | catalog_product_category | 索引产品/类别关联 | php magento indexer:reindex catalog_product_category |
Product price / 产品价格 | catalog_product_price | 索引产品价格 | php magento indexer:reindex catalog_product_price |
Product entity attribute value / 产品实体属性值 / 产品EAV / EAV产品 | catalog_product_attribute | 索引产品EAV | php magento indexer:reindex catalog_product_attribute |
Stock / 股票 | cataloginventory_stock | 索引股票 | php magento indexer:reindex cataloginventory_stock |
Catalog rule product / 目录规则产品 | catalogrule_rule | 索引规则/产品关联 | php magento indexer:reindex catalogrule_rule |
Catalog product rule /目录产品规则 | catalogrule_product | 索引产品/规则关联 | php magento indexer:reindex catalogrule_product |
Catalog search / 目录搜索 | catalogsearch_fulltext | 重建目录产品全文搜索索引 | php magento indexer:reindex catalogsearch_fulltext |