PHP code example of miradnan / yii2-elasticsearch
1. Go to this page and download the library: Download miradnan/yii2-elasticsearch library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
miradnan / yii2-elasticsearch example snippets
return [
//....
'components' => [
'elasticsearch' => [
'class' => 'miradnan\elasticsearch\Connection',
'nodes' => [
['http_address' => '127.0.0.1:9200'],
// configure more hosts if you have a cluster
],
],
]
];