ingatlancom / solr-client-symfony
Solr API client using the JSON API.
Installs: 8 138
Dependents: 0
Suggesters: 0
Security: 0
Stars: 2
Watchers: 3
Forks: 3
Open Issues: 0
Requires
- php: >=7.4
- ext-json: *
- symfony/http-client-contracts: ^1.1|^2.0
- symfony/polyfill-php80: ^1.15
Requires (Dev)
- phpro/grumphp-shim: v1.3.1
- phpstan/phpstan: 0.12.74
- phpstan/phpstan-phpunit: 0.12.17
- phpstan/phpstan-strict-rules: 0.12.9
- phpunit/phpunit: 10.0.x-dev@dev
- psalm/phar: 4.3.1
- symfony/http-client: ^4.3|^5.0
- symplify/easy-coding-standard-prefixed: 9.1.3
This package is auto-updated.
Last update: 2024-11-10 19:28:29 UTC
README
Simple Solr client using the JSON Request API available since Solr 5.1, so this client only usable after that version.
Install
$ composer require icom/solr-client
Usage
<?php declare(strict_types=1);
use iCom\SolrClient\SolrClient;
require_once dirname(__DIR__).'/vendor/autoload.php';
$client = SolrClient::create(['base_uri' => 'http://127.0.0.1:8983/solr/core/']);
try {
$result = $client->select('{"query": "*:*"}');
// do something with the result
} catch (\iCom\SolrClient\Exception\Exception $e) {
// handle errors
}
Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate. For details please consult with our contribution guide.