PHP Class Smile\ElasticsuiteCore\Helper\IndexSettings

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

Public Methods

Method Description
createIndexNameFromIdentifier ( string $indexIdentifier, integer | string | Magento\Store\Api\Data\StoreInterface $store ) : string Create a new index for an identifier (eg. catalog_product) by store including current date.
getBatchIndexingSize ( ) : integer Get number the batch indexing size from the configuration.
getIndexAliasFromIdentifier ( string $indexIdentifier, integer | string | Magento\Store\Api\Data\StoreInterface $store ) : string Returns the index alias for an identifier (eg. catalog_product) by store.
getLanguageCode ( integer | string | Magento\Store\Api\Data\StoreInterface $store ) : string Return the locale code (eg.: "en") for a store.
getLocaleCode ( integer | string | Magento\Store\Api\Data\StoreInterface $store ) : string Return the locale code (eg.: "en_US") for a store.
getNumberOfReplicas ( ) : integer Get number of replicas from the configuration.
getNumberOfShards ( ) : integer Get number of shards from the configuration.

Private Methods

Method Description
getIndexAlias ( ) : string Get the index alias from the configurarion.
getIndicesSettingsConfigParam ( string $configField ) : mixed Read config under the path smile_elasticsuite_core_base_settings/indices_settings.
getStore ( integer | string | Magento\Store\Api\Data\StoreInterface $store ) : Magento\Store\Api\Data\StoreInterface Ensure store is an object or load it from it's id / identifier.
getStoreCode ( Magento\Store\Api\Data\StoreInterface | integer $store ) : string Retrieve the store code from object or store id.

Method Details

createIndexNameFromIdentifier() public method

Create a new index for an identifier (eg. catalog_product) by store including current date.
public createIndexNameFromIdentifier ( string $indexIdentifier, integer | string | Magento\Store\Api\Data\StoreInterface $store ) : string
$indexIdentifier string Index identifier.
$store integer | string | Magento\Store\Api\Data\StoreInterface The store.
return string

getBatchIndexingSize() public method

Get number the batch indexing size from the configuration.
public getBatchIndexingSize ( ) : integer
return integer

getIndexAliasFromIdentifier() public method

Returns the index alias for an identifier (eg. catalog_product) by store.
public getIndexAliasFromIdentifier ( string $indexIdentifier, integer | string | Magento\Store\Api\Data\StoreInterface $store ) : string
$indexIdentifier string An index identifier.
$store integer | string | Magento\Store\Api\Data\StoreInterface The store.
return string

getLanguageCode() public method

Return the locale code (eg.: "en") for a store.
public getLanguageCode ( integer | string | Magento\Store\Api\Data\StoreInterface $store ) : string
$store integer | string | Magento\Store\Api\Data\StoreInterface The store.
return string

getLocaleCode() public method

Return the locale code (eg.: "en_US") for a store.
public getLocaleCode ( integer | string | Magento\Store\Api\Data\StoreInterface $store ) : string
$store integer | string | Magento\Store\Api\Data\StoreInterface The store.
return string

getNumberOfReplicas() public method

Get number of replicas from the configuration.
public getNumberOfReplicas ( ) : integer
return integer

getNumberOfShards() public method

Get number of shards from the configuration.
public getNumberOfShards ( ) : integer
return integer