Magento Open Source 2.3.x

Index Management

Magento reindexes automatically whenever one or more items change. Actions that trigger reindexing include price changes, creating catalog or shopping cartA grouping of products that the customer wishes to purchase at the end of their shopping session. price rules, adding new categories, and so on. To optimize performance, Magento accumulates data into special tables using indexers. As the data changes, the indexed tables must be updated—or reindexed. Magento reindexes as a background process, and your store remains accessible during the processes.

Reindexing data speeds up processing, and reduces the time the customer has to wait. For example, if you change the price of an item from $4.99 to $3.99, Magento reindexes the data to show the price change in the store. Without indexing, Magento would have to calculate the price of every product on the fly—taking into account shopping cart price rules, bundle pricing, discounts, tier pricing, and so on. Loading the price for a product might take longer than the customer is willing to wait.

The indexers can be set to either update on save or on schedule. When indexing on save, Magento starts a reindex on save actions. The Index Management page will update and flush the reindex message within a minute or two. When reindexing on a schedule, a reindex runs according to a schedule as a cron job. A system message appears if a cron job is not available to update any indexers that become invalid. Your store remains accessible during reindex processes.

When you need to reindex, a notification appears at the top of the page. The index and message clears based on the reindex mode and potential actions you take.


Reindex notification

For technical information, see Indexing overview in DevDocs developer documentation.


Index Management

Best practices for reindexing

Reindexing and caching have different purposes Magento. Indexes track database information for increased search performance, faster data retrieval for storefronts, and more. Caches save loaded data, images, formats, and the like for increased performance loading and accessing the storefront.

  • Typically, you want to reindex when updating data in Magento.
  • If you have a large store or multiple stores, you may want to set indexers like categoryA set of products that share particular characteristics or attributes. and products to scheduled cron jobs due to potential reindex looping. You may want to set the reindex on a schedule during non-peak hours.
  • When reindexing, you do not need to also perform a flush cache.
  • For fresh Magento installations, you need to flush the cache and reindex.
  • Flushing caches and reindexing does not flush your computer's web browser cache. We recommend also flushing the browser cache after completing updates to your storefront.

To change the index mode:

1. On the Admin sidebar, tap System. Then under Tools, choose Index Management.
2. Mark the checkbox of each indexer that you want to change.
3. Set Actions to one of the following:
  • Update on Save
  • Update by Schedule
4. Tap Submit to apply the change to each selected indexer.
  • Column Descriptions

    Column

    Description

    Indexer

    The name of the indexer.

    Description

    A description of the indexer.

    Mode

    Indicates the current update mode for each indexer. Options:

    Update on Save

    The index is set to update whenever an entity change is saved. These entities include products, categories, and customers. When the save action completes, a series of steps begin catching the changes and updating the index. The Index Management page will update and flush the reindex message within a minute or two.

    Update on Schedule

    The index is set to update on schedule according to a cron jobs. The cron job includes the schedule interval for reindexing, writing updates to the index when run.

    Status

    Displays one of the following:

    Ready

    The index is up-to-date.

    Scheduled

    Reindexing is scheduled to take place.

    Running

    Reindexing is currently running.

    Reindex Required

    A change has been made that requires reindexing, but the indexers cannot be updated automatically. Check to see if cron is available and configured correctly.

    Updated

    Indicates the date and time an index was last updated.

    To reindex manually:

    1. On the Admin sidebar, tap System. Then under Tools, choose Index Management.
    2. Mark the checkbox of each indexer to reindex.
    3. Set Actions to “Reindex Data.”

    Manually reindex
    4. Tap Submit.

    To reindex using the Command Line:

    Magento provides additional reindex options using the command line. These options may require developer support to complete. For complete details and command options, see Reindex in Manage the indexers. The DevDocs PHP Developer Guide also includes an Indexing section.