Can I update product attributes without running reindex?
As you know, the load () / setData () / save () script starts reindex.
I have studied the updateAttributes method in 'Mage_Catalog_Model_Product_Action', but I think it also launches the product reindex.
public function updateAttributes($productIds, $attrData, $storeId)
{
$this->_getResource()->updateAttributes($productIds, $attrData, $storeId);
$this->setData(array(
'product_ids' => array_unique($productIds),
'attributes_data' => $attrData,
'store_id' => $storeId
));
Mage::getSingleton('index/indexer')->processEntityAction(
$this, Mage_Catalog_Model_Product::ENTITY, Mage_Index_Model_Event::TYPE_MASS_ACTION
);
return $this;
}
The code under the event index index "// bulk register" seems to trigger the action of the indexer.
source
share