PHP Class Smile\ElasticsuiteThesaurus\Model\Indexer\IndexHandler

Author: Aurelien FOUCRET ([email protected])
Show file Open project: smile-sa/elasticsuite Class Usage Examples

Public Methods

Method Description
__construct ( Smile\ElasticsuiteCore\Api\Client\ClientFactoryInterface $clientFactory, Smile\ElasticsuiteCore\Api\Index\IndexOperationInterface $indexManager, IndexSettings $indexSettingsHelper, Cache $cacheHelper ) Constructor.
reindex ( integer $storeId, string[] $synonyms, string[] $expansions ) : void Create the synonyms index for a store id.

Private Methods

Method Description
addAnalyzerSettings ( array $settings, string $type, string[] $values ) : array Append an analyzer for a thesaurus to existing settings.
getIndexSettings ( string[] $synonyms, string[] $expansions ) : array Returns index settings.
prepareSynonymFilterData ( string[] $rows ) : string[] Prepare the thesaurus data to be saved.

Method Details

__construct() public method

Constructor.
public __construct ( Smile\ElasticsuiteCore\Api\Client\ClientFactoryInterface $clientFactory, Smile\ElasticsuiteCore\Api\Index\IndexOperationInterface $indexManager, IndexSettings $indexSettingsHelper, Cache $cacheHelper )
$clientFactory Smile\ElasticsuiteCore\Api\Client\ClientFactoryInterface ES Client factory.
$indexManager Smile\ElasticsuiteCore\Api\Index\IndexOperationInterface ES index management tool
$indexSettingsHelper Smile\ElasticsuiteCore\Helper\IndexSettings Index settings helper.
$cacheHelper Smile\ElasticsuiteCore\Helper\Cache ES caching helper.

reindex() public method

Create the synonyms index for a store id.
public reindex ( integer $storeId, string[] $synonyms, string[] $expansions ) : void
$storeId integer Store id.
$synonyms string[] Raw synonyms list.
$expansions string[] Raw expansions list.
return void