Magento重新索引问题 [英] Magento Re- Indexing Issue

查看:71
本文介绍了Magento重新索引问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Magento中面临一个问题.我在一家Magento商店中拥有多种网站功能,其中包含大约4500种产品.我想重新索引产品.

I am facing one issue in Magento. I am having one Magento store with multi website functionality which containing approx 4500 products. I want to re-indexing product.

我通过magento的默认功能通过csv导入了4500种产品.导入产品后,更改未在正面显示,所以我去了索引管理,发现有两个索引处于处理状态

I had import 4500 product by csv through magento default functionality. after importing product the changes is not showing on front side so i went to index management and i found there are two indexes are in processing status

1个产品属性2个产品单位数据

1 Product Attributes 2 Product Flat Data

我已经完成了以下步骤:

I had already done following steps:

1尝试从管理员端系统->索引管理对其重新编制索引

1 try to re-index it from admin side system->index management

2尝试通过调用php脚本手动完成

2 try to do manually by calling php script

require_once 'app/Mage.php';
umask( 0 );
Mage :: app( "default" );
$process = Mage::getSingleton('index/indexer')->getProcessByCode('catalog_product_flat');
$process->reindexAll();

OR

$indexingProcesses = Mage::getSingleton('index/indexer')->getProcessesCollection(); 
foreach ($indexingProcesses as $process) {
    $process->reindexEverything();
}

还要将var/locks文件夹权限更改为777,并重命名该文件夹,并尝试删除在此lock文件夹中创建但没有解决方法的.lock文件.

Also change the var/locks folder permission to 777 and also rename that folder and also try to delete the .lock file which was created in this lock folder but not got the solution.

我没有SSH权限.还有其他解决方案可以帮助我解决重新索引问题.

I am not having SSH rights. So is there any other solution which will help me to solve re-indexing problem.

推荐答案

原因

catalog_product_flat_%表中有不存在/已删除产品的引用.

There are references to inexisting/deleted products in catalog_product_flat_% tables.

解决方案

尝试在MySQL控制台中或通过phpMyAdmin截断"catalog_product_flat_%"表(catalog_product_flat_1,catalog_product_flat_2,catalog_product_flat_3等):

Try to truncate ´catalog_product_flat_%´ tables (catalog_product_flat_1, catalog_product_flat_2, catalog_product_flat_3 etc.) in MySQL console or via phpMyAdmin:

mysql > truncate table ´catalog_product_flat_1´;
mysql > truncate table ´catalog_product_flat_2´;
mysql > truncate table ´catalog_product_flat_3´;

然后重新编制索引.

这篇关于Magento重新索引问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆