ShopIndex example

$this->indexConfig
        );
    }

    /** * @param string $mappingType * * @return ShopIndex */
    public function createShopIndex(Shop $shop$mappingType)
    {
        return new ShopIndex($this->getIndexName($shop$mappingType)$shop$mappingType);
    }

    /** * @return string */
    public function getPrefix()
    {
        return $this->prefix;
    }

    /** * @return string */

    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 */
Home | Imprint | This part of the site doesn't use cookies.