This is where your description should go. Try and limit it to a paragraph or two, and maybe throw in a mention of what PSRs you support to avoid any confusion with users and contributors.
Via Composer
$ composer require phpinnacle/elastics
<?php
use PHPinnacle\Elastics\Search;
use PHPinnacle\Elastics\Query;
require __DIR__ . '/vendor/autoload.php';
$query = new Query\Boolean();
$query
->must(new Query\Match('name', 'Alex'))
->mustNot(
new Query\Term('gender', 'male'),
new Query\Terms('eye_color', ['blue', 'green'])
)
->filter(new Query\Range('age', 21))
;
$search = Search::match($query);
$search
->order('name', 'asc')
->limit(50)
;
$client = curl_init('127.0.0.1:9200/users/_search?pretty');
curl_setopt_array($client, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_POSTFIELDS => (string) $search,
CURLOPT_HTTPHEADER => ['Content-Type: application/json'],
]);
$result = curl_exec($client);
echo $result;
Please see CHANGELOG for more information on what has changed recently.
$ composer test
Please see CONTRIBUTING and CONDUCT for details.
If you discover any security related issues, please email dev@phpinnacle.com instead of using the issue tracker.
The MIT License (MIT). Please see License File for more information.