Magento has qualified to become one of the best possible eCommerce store models in the present times. You would find that when running an online store you would have hundreds of products lined up on your store. Each one has a different priority and each one is different from the other. While considering that, you need to figure out how to index the products such that they are available to the consumers based on their priority.
The best part of using Magento as a platform is that it indexes the products automatically. When you load products to your Magento based website, you will find that the indexing is done automatically, and the products are lined up easily as per their priority.
Recommended Read: How to Indexing in Magento using
But, what happens when your products are upgraded? What happens when you suddenly find newer products on your website? How will you begin indexing them? Before you perform the task of re-indexing you will need to identify a few this and begin understanding how the process works. You will also need to understand how the command line is used for the process too.
Status of Indexes
Before you begin reindexing of your products, you need to consider the exact status of your indexes. When you check the status, you will find that the output you receive as a result of this would be something like below:
Product Flat Data: Requires Re-Indexing
You will find those category products, category flat data etc. have an output which says pending. In this case, you may want to consider re-indexing of your data. You have two major ways to re-index the data. One you can re-index using a single index or using multiple indices. You have this choice.
Re-indexing a Single Index
When you begin indexing you will find that each index in the product catalog has its own indexing key. This key, you can use whenever your web store asks you to re-index your product catalog. This way you will be able to index your products easily and faster.
Whenever you wish to re-index a single product, you may want to use the following command.
Php indexer.php – reindex [Index Option Code]
In case you are planning to re-index multiple indices, here is your command
Php indexer.php – reindex catalog_product_price, catalog_url, catalog_product_flat
The other way to re-indexing is when you consider re-indexing all the possible indexes available on your website. Here is the command that may benefit you.
Php indexer.php – reindexall
Re-indexing using Command Line
When you are using a command line, you need to know what you are planning to re-index. Like the one explained above, checking on your index status is very important. For that you may need to use the following command line:
Now when you do that you will receive the information on the following indexes
- Product Attributes
- Product Prices
- URL Rewrites
- Product Flat Data
- Category Flat Data
- Category Products
- Catalog Search Index
- Stock Status.
Once you have the information on all these indexes, you can use a command line to allow you to re-index the data for any one of these product attributes related data.
The command used for the purpose includes:
Php/your-Magento-Path//shell/indexer.php –reindex catalog_product_price
Php/your-Magento-Path//shell/indexer.php – reindex cataloginventory_stock
You will see that this method of re-indexing works to be faster as compared to other methods including changing the admin settings. In case you have upgraded the products on your website, it is a good habit to change the indexes too.
Need any help in website re-indexing or any Magento services? Feel free to talk with M-Connect’s Magento Developers. We are happy to help you.