public function index(Shop
$shop, ProgressHelperInterface
$helper, ?array
$indexNames = null
) { $lastBacklogId =
$this->backlogReader->
getLastBacklogId();
foreach ($this->mappings
as $mapping) { if (!
empty($indexNames) && !\
in_array($mapping->
getType(),
$indexNames)) { continue;
} $configuration =
$this->indexFactory->
createIndexConfiguration($shop,
$mapping->
getType());
$shopIndex =
new ShopIndex($configuration->
getName(),
$shop,
$mapping->
getType());
$this->
createIndex($configuration,
$shopIndex);
$this->
updateMapping($shopIndex,
$mapping);
$this->
populate($shopIndex,
$helper);
$this->
applyBacklog($shopIndex,
$lastBacklogId);
$this->
createAlias($configuration);
} } /**
* Removes unused indices
*/