PHP code example of internations / solr-query-component
1. Go to this page and download the library: Download internations/solr-query-component 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/ */
internations / solr-query-component example snippets
use InterNations\Component\Solr\Expression\ExpressionBuilder;
$eb = new ExpressionBuilder();
echo $eb->field('name', $eb->boost($eb->eq('John Doe'), 100));
use InterNations\Component\Solr\Query\QueryString;
echo (new QueryString('name:<name>^<boost>'))
->setPlaceholder('name', 'John Doe')
->setPlaceholder('boost', 100);