ingatlancom / solr-client-symfony
使用JSON API的Solr API客户端。
dev-master / 1.0.x-dev
2021-02-10 11:03 UTC
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-09-10 19:14:30 UTC
README
这是一个简单的Solr客户端,使用自Solr 5.1以来的JSON请求API,因此此客户端仅适用于该版本之后。
安装
$ composer require icom/solr-client
使用
<?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
}
贡献
欢迎提交pull请求。对于重大更改,请先提出问题以讨论您想要进行的更改。
请确保适当更新测试。有关详细信息,请参阅我们的贡献指南。