Magento 2 Documentation
2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
|
Public Member Functions | |
__construct ( $options=[], $elasticsearchClient=null) | |
ping () | |
testConnection () | |
bulkQuery ($query) | |
createIndex ($index, $settings) | |
deleteIndex ($index) | |
isEmptyIndex ($index) | |
updateAlias ($alias, $newIndex, $oldIndex='') | |
indexExists ($index) | |
existsAlias ($alias, $index='') | |
getAlias ($alias) | |
addFieldsMapping (array $fields, $index, $entityType) | |
deleteMapping ($index, $entityType) | |
query ($query) | |
suggest ($query) | |
Elasticsearch client
Definition at line 14 of file Elasticsearch.php.
__construct | ( | $options = [] , |
|
$elasticsearchClient = null |
|||
) |
Initialize Elasticsearch Client
array | $options | |
\Elasticsearch\Client | null | $elasticsearchClient |
LocalizedException |
Definition at line 45 of file Elasticsearch.php.
addFieldsMapping | ( | array | $fields, |
$index, | |||
$entityType | |||
) |
Add mapping to Elasticsearch index
array | $fields | |
string | $index | |
string | $entityType |
Definition at line 246 of file Elasticsearch.php.
bulkQuery | ( | $query | ) |
Performs bulk query over Elasticsearch index
array | $query |
Definition at line 133 of file Elasticsearch.php.
createIndex | ( | $index, | |
$settings | |||
) |
Creates an Elasticsearch index.
string | $index | |
array | $settings |
Definition at line 145 of file Elasticsearch.php.
deleteIndex | ( | $index | ) |
Delete an Elasticsearch index.
string | $index |
Definition at line 159 of file Elasticsearch.php.
deleteMapping | ( | $index, | |
$entityType | |||
) |
Delete mapping in Elasticsearch index
string | $index | |
string | $entityType |
Definition at line 330 of file Elasticsearch.php.
existsAlias | ( | $alias, | |
$index = '' |
|||
) |
Exists alias.
string | $alias | |
string | $index |
Definition at line 218 of file Elasticsearch.php.
getAlias | ( | $alias | ) |
indexExists | ( | $index | ) |
Checks whether Elasticsearch index exists
string | $index |
Definition at line 206 of file Elasticsearch.php.
isEmptyIndex | ( | $index | ) |
Check if index is empty.
string | $index |
Definition at line 170 of file Elasticsearch.php.
ping | ( | ) |
query | ( | $query | ) |
Execute search by $query
array | $query |
Definition at line 344 of file Elasticsearch.php.
suggest | ( | $query | ) |
Execute suggest query
array | $query |
Definition at line 376 of file Elasticsearch.php.
testConnection | ( | ) |
Validate connection params
Implements ClientInterface.
Definition at line 98 of file Elasticsearch.php.
updateAlias | ( | $alias, | |
$newIndex, | |||
$oldIndex = '' |
|||
) |
Updates alias.
string | $alias | |
string | $newIndex | |
string | $oldIndex |
Definition at line 187 of file Elasticsearch.php.