PHP code example of schranz-search / seal-redisearch-adapter
1. Go to this page and download the library: Download schranz-search/seal-redisearch-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-redisearch-adapter example snippets
use Redis;
use Schranz\Search\SEAL\Adapter\RediSearch\RediSearchAdapter;
use Schranz\Search\SEAL\Engine;
$redis = new Redis([
'host' => '127.0.0.1',
'port' => 6379,
'auth' => ['phpredis', 'phpredis'],
]);
$engine = new Engine(
new RediSearchAdapter($redis),
$schema,
);