PHP code example of schranz-search / seal-elasticsearch-adapter
1. Go to this page and download the library: Download schranz-search/seal-elasticsearch-adapter 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/ */
schranz-search / seal-elasticsearch-adapter example snippets
use Elastic\Elasticsearch\ClientBuilder;
use Schranz\Search\SEAL\Adapter\Elasticsearch\ElasticsearchAdapter;
use Schranz\Search\SEAL\Engine;
$client = ClientBuilder::create()->setHosts([
'127.0.0.1:9200'
])->build()
$engine = new Engine(
new ElasticsearchAdapter($client),
$schema,
);