Magento_Indexer module
This module provides Magento Indexing functionality. It allows to:
- read indexers configuration
- represent indexers in admin
- regenerate indexes by cron schedule
- regenerate indexes from console
- view and reset indexer state from console
- view and set indexer mode from console
Installation
This module is one of the base modules. You cannot disable or uninstall this module.
This module is dependent on the following modules:
Magento_StoreMagento_AdminNotification
This module creates the following tables in the database:
indexer_statemview_state
For information about a module installation, see Enable or disable modules.
Structure
App/ - the directory that contains the launch application entry point.
For information about a typical file structure of a module, see Module file structure.
Extensibility
Extension developers can interact with the Magento_Indexer module. For more information about the extension mechanism, see Plugins.
The dependency injection mechanism enables you to override the functionality of the Magento_Indexer module.
Events
The module dispatches the following events:
Model
clean_cache_by_tagsevent in the\Magento\Indexer\Model\Indexer\CacheCleaner::cleanCachemethod. Parameters:objectis acacheContextobject (Magento\Framework\Indexer\CacheContextclass)
Plugin
-
clean_cache_after_reindexevent in the\Magento\Indexer\Model\Processor\CleanCache::afterUpdateMviewmethod. Parameters:objectis acontextobject (Magento\Framework\Indexer\CacheContextclass)
-
clean_cache_by_tagsevent in the\Magento\Indexer\Model\Processor\CleanCache::afterReindexAllInvalidmethod. Parameters:objectis acontextobject (Magento\Framework\Indexer\CacheContextclass)
For information about an event, see Events and observers.
Layouts
This module introduces the following layout handles in the view/adminhtml/layout directory:
indexer_indexer_listindexer_indexer_list_grid
For more information about layouts, see the Layout documentation.
Additional information
Indexer modes
There are 2 modes of the indexers:
- Update on Save - index tables are updated immediately after the dictionary data is changed
- Update by Schedule - index tables are updated by cron job according to the configured schedule
Console commands
This module provides the following console commands:
bin/magento indexer:info- view a list of all indexersbin/magento indexer:status [indexer]- view index statusbin/magento indexer:reindex [indexer]- run reindexbin/magento indexer:reset [indexer]- reset indexersbin/magento indexer:show-mode [indexer]- view the current indexer configurationbin/magento indexer:set-mode {realtime|schedule} [indexer]- specify the indexer configurationbin/magento indexer:set-dimensions-mode [indexer]- set indexer dimension modebin/magento indexer:show-dimensions-mode [indexer]- set indexer dimension mode
Cron options
Cron group configuration can be set at etc/crontab.xml:
indexer_reindex_all_invalid- regenerate indexes for all invalid indexersindexer_update_all_views- update indexer viewsindexer_clean_all_changelogs- clean indexer view changelogs
Learn how to configure and run cron in Magento.
You can get more information at the following articles:
- Learn more about indexing
- Learn more about Indexer optimization
- Learn more how to add custom indexer
- Learn how to manage indexers
- Learn more about Index Management
data-slots=text