PHP Интерфейс Smile\ElasticsuiteCore\Api\Index\IndexOperationInterface

Автор: Aurelien FOUCRET ([email protected])
Показать файл Открыть проект Примеры использования интерфейса

Открытые методы

Метод Описание
createBulk ( ) : Smile\ElasticsuiteCore\Api\Index\Bulk\BulkRequestInterface Create a new empty bulk.
createIndex ( string $indexIdentifier, integer | string | Magento\Store\Api\Data\StoreInterface $store ) : Smile\ElasticsuiteCore\Api\Index\IndexInterface Prepare a new index into ES from it's identifier (e.g.: catalog_product).
executeBulk ( Smile\ElasticsuiteCore\Api\Index\Bulk\BulkRequestInterface $bulk ) : Smile\ElasticsuiteCore\Api\Index\Bulk\BulkResponseInterface Execute a bulk and return the execution response.
getBatchIndexingSize ( ) : integer Returns batch indexing size.
getIndexByName ( string $indexIdentifier, integer | string | Magento\Store\Api\Data\StoreInterface $store ) : Smile\ElasticsuiteCore\Api\Index\IndexInterface Returns an index by it's identifier (e.g.: catalog_product) and by store.
indexExists ( string $indexIdentifier, integer | string | Magento\Store\Api\Data\StoreInterface $store ) : boolean Check if an index exists using it's identifier (e.g.: catalog_product) and by store.
installIndex ( Smile\ElasticsuiteCore\Api\Index\IndexInterface $index, integer | string | Magento\Store\Api\Data\StoreInterface $store ) : Smile\ElasticsuiteCore\Api\Index\IndexInterface Switch the alias to the installed index and delete the old index.
isAvailable ( ) : boolean Check if the ES service is available.
proceedIndexInstall ( string $indexName, string $indexAlias ) : void Proceed to the indices install :
refreshIndex ( Smile\ElasticsuiteCore\Api\Index\IndexInterface $index ) : Smile\ElasticsuiteCore\Api\Index\IndexOperationInterface Refresh an index (should be called after indexing operations to ensure data are available for search).

Описание методов

createBulk() публичный Метод

Create a new empty bulk.
public createBulk ( ) : Smile\ElasticsuiteCore\Api\Index\Bulk\BulkRequestInterface
Результат Smile\ElasticsuiteCore\Api\Index\Bulk\BulkRequestInterface

createIndex() публичный Метод

The index is created with a horodated name prefixed by the alias (eg.: magento2_catalog_product_2060201_122145).
public createIndex ( string $indexIdentifier, integer | string | Magento\Store\Api\Data\StoreInterface $store ) : Smile\ElasticsuiteCore\Api\Index\IndexInterface
$indexIdentifier string Index identifier.
$store integer | string | Magento\Store\Api\Data\StoreInterface Store (id, identifier or object).
Результат Smile\ElasticsuiteCore\Api\Index\IndexInterface

executeBulk() публичный Метод

Execute a bulk and return the execution response.
public executeBulk ( Smile\ElasticsuiteCore\Api\Index\Bulk\BulkRequestInterface $bulk ) : Smile\ElasticsuiteCore\Api\Index\Bulk\BulkResponseInterface
$bulk Smile\ElasticsuiteCore\Api\Index\Bulk\BulkRequestInterface Bulk to be executed.
Результат Smile\ElasticsuiteCore\Api\Index\Bulk\BulkResponseInterface

getBatchIndexingSize() публичный Метод

Returns batch indexing size.
public getBatchIndexingSize ( ) : integer
Результат integer

getIndexByName() публичный Метод

If the index does not exists into ES a \LogicalException is thrown.
public getIndexByName ( string $indexIdentifier, integer | string | Magento\Store\Api\Data\StoreInterface $store ) : Smile\ElasticsuiteCore\Api\Index\IndexInterface
$indexIdentifier string Index identifier.
$store integer | string | Magento\Store\Api\Data\StoreInterface Store (id, identifier or object).
Результат Smile\ElasticsuiteCore\Api\Index\IndexInterface

indexExists() публичный Метод

Check if an index exists using it's identifier (e.g.: catalog_product) and by store.
public indexExists ( string $indexIdentifier, integer | string | Magento\Store\Api\Data\StoreInterface $store ) : boolean
$indexIdentifier string Index identifier.
$store integer | string | Magento\Store\Api\Data\StoreInterface Store (id, identifier or object).
Результат boolean

installIndex() публичный Метод

Switch the alias to the installed index and delete the old index.
public installIndex ( Smile\ElasticsuiteCore\Api\Index\IndexInterface $index, integer | string | Magento\Store\Api\Data\StoreInterface $store ) : Smile\ElasticsuiteCore\Api\Index\IndexInterface
$index Smile\ElasticsuiteCore\Api\Index\IndexInterface Installed index.
$store integer | string | Magento\Store\Api\Data\StoreInterface Store (id, identifier or object).
Результат Smile\ElasticsuiteCore\Api\Index\IndexInterface

isAvailable() публичный Метод

Check if the ES service is available.
public isAvailable ( ) : boolean
Результат boolean

proceedIndexInstall() публичный Метод

1) First switch the alias to the new index 2) Remove old indices
public proceedIndexInstall ( string $indexName, string $indexAlias ) : void
$indexName string Real index name.
$indexAlias string Index alias (must include store identifier).
Результат void

refreshIndex() публичный Метод

Refresh an index (should be called after indexing operations to ensure data are available for search).
public refreshIndex ( Smile\ElasticsuiteCore\Api\Index\IndexInterface $index ) : Smile\ElasticsuiteCore\Api\Index\IndexOperationInterface
$index Smile\ElasticsuiteCore\Api\Index\IndexInterface Index
Результат Smile\ElasticsuiteCore\Api\Index\IndexOperationInterface