Catalog minions
The Catalog plugin contributes minions that function as worker processes responsible for the indexing of catalog entities.
Catalog indexing minions
The Catalog plugin defines minions that are responsible for the indexing Catalog entities, that is catalogs, categories, and sellable items. The minions are triggered when a full or partial index rebuild of Sitecore_master_index or Sitecore_web_index is invoked.
ItemFullIndexMinion
The ItemFullIndexMinion
minion is responsible for the re-indexing of catalog entities (such as catalogs, categories and sellable items) in the Commerce Engine, in a way that the Sitecore search provider can consume, to enable Sitecore items search. The ItemFullIndexMinion
minion is invoked on-demand, for example when you initiate a full rebuild of the master index (sitecore_master_index
) or web index (sitecore_web_index
). You can rebuild a search index using Sitecore, or using a sample request in Postman.
The following shows an example of the default global configuration policy that defines the properties of the ItemFullIndexMinion
minion. The minion configuration is defined in the wwwroot\data\Environment\PlugIn.Minions.PolicySet-1.0.0.json
file.
{
"$type":
"Sitecore.Commerce.Core.MinionPolicy, Sitecore.Commerce.Core",
"FullyQualifiedName":
"Sitecore.Commerce.Plugin.Catalog.ItemFullIndexMinion,
Sitecore.Commerce.Plugin.Catalog",
"ItemsPerBatch": 1000,
"ListsToWatch": [
"SitecoreItemIndexingMaster"
],
},
{
"$type": "Sitecore.Commerce.Core.MinionPolicy, Sitecore.Commerce.Core",
"FullyQualifiedName": "Sitecore.Commerce.Plugin.Catalog.ItemFullIndexMinion, Sitecore.Commerce.Plugin.Catalog",
"ItemsPerBatch": 1000,
"ListsToWatch": [
"SitecoreItemIndexingWeb"
],
},
ItemIncrementalndexMinion
The ItemIncrementalIndexMinion
minion is responsible for the indexing of changed or new catalog entities at a regular interval, to ensure that the Sitecore master and web indexes are updated with the latest changes about catalog entities in the Commerce Engine.
Whenever a catalog entity such as a catalog, category, or sellable item is added, removed, or modified in the Commerce Engine, the change is tracked in a list that the minion is watching (for example, "ListsToWatch":"CatalogItemsIncrementalIndexMaster
). When invoked, the ItemIncrementalIndexMinion
minion indexes all entities in the list, and then clears the list when indexing is complete.
The following example shows the global configuration policy that defines two instances of the ItemIncrementalIndexMinion
minion, each watching a distinct list. The minion configuration is defined in the wwwroot\data\Environment\PlugIn.Minions.PolicySet-1.0.0.json
file. The lists that the ItemIncrementalIndexMinion
minion watches are defined in the PlugIn.CatalogIndexing.PolicySet-1.0.0.json
.
{
"$type": "Sitecore.Commerce.Core.MinionPolicy, Sitecore.Commerce.Core",
"FullyQualifiedName": "Sitecore.Commerce.Plugin.Catalog.ItemIncrementalIndexMinion, Sitecore.Commerce.Plugin.Catalog",
"ItemsPerBatch": 1000,
"ListsToWatch": [
"CatalogItemsIncrementalIndexMaster"
],
},
{
"$type": "Sitecore.Commerce.Core.MinionPolicy, Sitecore.Commerce.Core",
"FullyQualifiedName": "Sitecore.Commerce.Plugin.Catalog.ItemIncrementalIndexMinion, Sitecore.Commerce.Plugin.Catalog",
"ItemsPerBatch": 1000,
"ListsToWatch": [
"CatalogItemsIncrementalIndexWeb"
],
}