PHP code example of cpliakas / solarium-luke
1. Go to this page and download the library: Download cpliakas/solarium-luke 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/ */
cpliakas / solarium-luke example snippets
use Solarium\Client;
use Solarium\QueryType\Luke\Query as LukeQuery;
$client->registerQueryType(LukeQuery::QUERY_LUKE, 'Solarium\\QueryType\\Luke\\Query');
$luke = $client->createQuery(LukeQuery::QUERY_LUKE);
$data = $client->execute($luke);
print 'Top terms: ';
var_dump($data->getTopTerms());
print PHP_EOL;