private function initIndex($indexIdentifier, $store, $existingIndex)
    {
        if (!isset($this->indicesConfiguration[$indexIdentifier])) {
            throw new \LogicException(
                "No index found with identifier {$indexIdentifier} into elasticsuite_indices.xml."
            );
        }

        $indexSettings    = $this->indexSettings;
        $indexAlias       = $indexSettings->getIndexAliasFromIdentifier($indexIdentifier, $store);
        $indexName        = $indexSettings->createIndexNameFromIdentifier($indexIdentifier, $store);
        $needInstall      = !$existingIndex;

        if ($existingIndex) {
            $indexName = $indexAlias;
        }

        $createIndexParams = ['identifier' => $indexIdentifier, 'name' => $indexName, 'needInstall' => $needInstall];

        $createIndexParams += $this->indicesConfiguration[$indexIdentifier];

        $index = $this->objectManager->create('\Smile\ElasticsuiteCore\Api\Index\IndexInterface', $createIndexParams);

        $this->indicesByIdentifier[$indexAlias] = $index;

        return $this->indicesByIdentifier[$indexAlias];
    }
private function initIndex($indexIdentifier, $store, $existingIndex)
    {
        if (!isset($this->indicesConfiguration[$indexIdentifier])) {
            throw new \LogicException(
                "No index found with identifier {$indexIdentifier} into elasticsuite_indices.xml."
            );
        }

        $indexSettings    = $this->indexSettings;
        $indexAlias       = $indexSettings->getIndexAliasFromIdentifier($indexIdentifier, $store);
        $indexName        = $indexSettings->createIndexNameFromIdentifier($indexIdentifier, $store);
        $needInstall      = !$existingIndex;

        if ($existingIndex) {
            $indexName = $indexAlias;
        }

        $createIndexParams = ['identifier' => $indexIdentifier, 'name' => $indexName, 'needInstall' => $needInstall];

        $createIndexParams += $this->indicesConfiguration[$indexIdentifier];

        $index = $this->objectManager->create('\Smile\ElasticsuiteCore\Api\Index\IndexInterface', $createIndexParams);

        $this->indicesByIdentifier[$indexAlias] = $index;

        return $this->indicesByIdentifier[$indexAlias];
    }
private function initIndex ( $ indexIdentifier , $ store , $ existingIndex ) { if ( ! isset ( $ this -> indicesConfiguration [ $ indexIdentifier ] ) ) { throw new \ LogicException ( "No index found with identifier {$indexIdentifier} into elasticsuite_indices.xml." ) ; } $ indexSettings = $ this -> indexSettings ; $ indexAlias = $ indexSettings -> getIndexAliasFromIdentifier ( $ indexIdentifier , $ store ) ; $ indexName = $ indexSettings -> createIndexNameFromIdentifier ( $ indexIdentifier , $ store ) ; $ needInstall = ! $ existingIndex ; if ( $ existingIndex ) { $ indexName = $ indexAlias ; } $ createIndexParams = [ 'identifier' => $ indexIdentifier , 'name' => $ indexName , 'needInstall' => $ needInstall ] ; $ createIndexParams += $ this -> indicesConfiguration [ $ indexIdentifier ] ; $ index = $ this -> objectManager -> create ( '\Smile\ElasticsuiteCore\Api\Index\IndexInterface' , $ createIndexParams ) ; $ this -> indicesByIdentifier [ $ indexAlias ] = $ index ; return $ this -> indicesByIdentifier [ $ indexAlias ] ; }
Init the index object.

@param string                                                $indexIdentifier An index indentifier.
@param integer|string|\Magento\Store\Api\Data\StoreInterface $store           The store.
@param boolean                                               $existingIndex   Is the index already existing.

@return \Smile\ElasticsuiteCore\Api\Index\IndexInterface
Init the index object .