PHP code example of cmsig / seal-opensearch-adapter

1. Go to this page and download the library: Download cmsig/seal-opensearch-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/ */

    

cmsig / seal-opensearch-adapter example snippets




use OpenSearch\ClientBuilder;
use CmsIg\Seal\Adapter\Opensearch\OpensearchAdapter;
use CmsIg\Seal\Engine;

$client = ClientBuilder::create()->setHosts([
    '127.0.0.1:9200'
])->build()

$engine = new Engine(
    new OpensearchAdapter($client),
    $schema,
);