1. Go to this page and download the library: Download oramacloud/client 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/ */
oramacloud / client example snippets
use OramaCloud\Client;
use OramaCloud\Client\Query;
$client = new Client([
'api_key' => '<Your Orama Cloud API Key>',
'endpoint' => '<Your Orama Cloud Endpoint>'
]);
$query = (new Query('red shoes'))
->where('price', 'gt', 99.99);
$results = $client->search($query);
use OramaCloud\Client;
use OramaCloud\Client\Query;
use OramaCloud\Client\QueryParams/WhereOperator;
use OramaCloud\Client\QueryParams/SortByOrder;
$client = new Client([
'api_key' => '<Your Orama Cloud API Key>',
'endpoint' => '<Your Orama Cloud Endpoint>'
]);
$query = new Query();
$query->term('red shoes')
->mode('hybrid')
->where('price', WhereOperator::LTE, 9.99)
->where('gender', WhereOperator::EQ, 'unisex')
->sortBy('price' SortByOrder::DESC)
->limit(5)
->offset(1);
$results = $client->search($query);