List of Magento 1 Index Processes
Magento has a number of indexes which need reindexing from time-to-time. Here's the complete list of the ones in Magento 1.
This is mainly for my own reference, but it will be useful for someone else coming across it too. I’m currently having to learn my way around Magento as part of a new role in work.
Magento has a number of indexes which need reindexing from time-to-time. Here's the complete list of the ones in Magento 1.
Index Key | Index Name |
---|---|
catalog_product_attribute | Product Attributes |
catalog_product_price | Product Prices |
catalog_url | Catalog Url Rewrites |
catalog_product_flat | Product Flat Data |
catalog_category_flat | Category Flat Data |
catalog_category_product | Category Products |
catalogsearch_fulltext | Catalog Search Index |
cataloginventory_stock | Stock status |
Example usage – Programatically clearing a index process
So here’s a an example. You want to programatically clear the catalog search index programatically. Here’s the code snippet that would do this. Notice the Index Key being used from the table above.
/** @var Mage_Index_Model_Process $index */ $index = Mage::getModel('index/indexer')->getProcessByCode('catalogsearch_fulltext'); $index->reindexAll();
So if you wanted to clear a couple, you could do it in a loop like this:
foreach (['catalog_url', 'catalogsearch_fulltext'] as $indexKey) { /** @var Mage_Index_Model_Process $index */ $index = Mage::getModel('index/indexer')->getProcessByCode($indexKey); $index->reindexAll(); }
There you go, short but sweet, maybe useful to someone. Usual applies, any questions or feedback, do it below.