Partial Indexers Maintenance

The Partial Indexers Maintenance module in Magento 2 manages partial indexers, which are used to rebuild database tables for changed entities. It offers a command-line interface to run a reindex only for entities from a change log and suspend or resume a partial reindex. Additionally, it provides information on which modules/code classes use a specific materialized view, making it useful for stores with customizations.
$20.00

Overview

The Partial Indexers Maintenance module helps to manage partial indexers.

Magento 2 has two types of indexes:

  • Full reindex, which means rebuilding all the indexing-related database tables.
  • Partial reindex, which means rebuilding the database tables only for the things that have changed (such as changing a single product attribute or price).

The materialized view (Mview) reindex is used to track database changes for a certain entity and runs a partial reindex only for the changed entities. The partial reindex is called by CRON, and it defines IDs to be re-indexed from the change log by the last applied version ID of the changed entity.

In some cases, the partial reindex may be suspended due to an error or have a large backlog of items to reindex. The out-of-the-box Magento functionality requires running a full re-index of an entity that may take several hours for a large catalog and affect customers who visit the website or require the website to be in maintenance mode during the reindex.

The module adds a command-line interface to run a reindex only for entities from a change log instead of a full reindex. Also, there is an option to suspend or resume a partial reindex that has been suspended. Additionally, in cases when your store has customizations, there is a command that shows which modules/code classes use a specific materialized view.

Commands

  • tsg:mview:reindex - Reindex a partial index.
  • tsg:mview:suspend - Suspend a partial index.
  • tsg:mview:reset - Reset a partial index to the idle state.
  • tsg:mview:resume - Resume a previously suspended partial index.
  • tsg:mview:subscriptions - View subscriptions for a partial index.
More Information
Magento Compatibility 2.4.x
License GNU General Public License v3.0 (GPL-3.0)
Composer Package thesgroup/module-mview-reindex

Automatically Add The Repository

Through an SSH connection, all you have to do is run the following command from your Magento installation directory

composer config repositories.www.sashas.org composer https://www.sashas.org

Manually Add The Repository

The typical Magento 2 installation has repositories section of composer.json like this:

           {
                "repositories": [
                    {
                        "type": "composer",
                        "url": "https://repo.magento.com/"
                    }
                ]
            }

You will need to add a repository by appending an object to the repositories object

           {
                "repositories": {
                    "0": {
                        "type": "composer",
                        "url": "https://repo.magento.com/"
                    },
                    "www.sashas.org": {
                        "type": "composer",
                        "url": "https://www.sashas.org"
                    }
                },
            }

How To Install The Module

Once the repository is added to the composer.json file, you can now install the packages that are available through it.

For example, let’s say you want to install the thesgroup/module-mview-reindex module through composer. Run the command below to install it:

composer require thesgroup/module-mview-reindex
Write Your Own Review
Only registered users can write reviews. Please Sign in or create an account