1. Go to this page and download the library: Download etrepat/compleet 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/ */
etrepat / compleet example snippets
$loader = new Compleet\Loader('venues');
$redis = new Predis\Client('tcp://127.0.0.1/6379?database=0');
$loader = new Compleet\Loader('venues', $redis);
$redis = new Predis\Client('tcp://127.0.0.1/6379?database=0');
$loader = new Compleet\Loader('venues');
$loader->setConnection($redis);
$redis = new Predis\Client('tcp://127.0.0.1/6379?database=0');
$matcher = new Compleet\Matcher('venues', $redis);
// or:
// $matcher = new Compleet\Matcher('venues');
// $matcher->setConnection($redis);
$results = $matcher->matches('stad');
$queryOptions = array(
// resultset size limit (defaults to 5)
'limit' => 5,
// whether to cache the results or not (defaults to true)
'cache' => true
// cache expiry time in seconds (defaults to 600)
'expiry' => 600
);
$results = $matcher->matches('stad', $queryOptions);