ingatlancom / solr-client-symfony

使用JSON API的Solr API客户端。

dev-master / 1.0.x-dev 2021-02-10 11:03 UTC

This package is auto-updated.

Last update: 2024-09-10 19:14:30 UTC


README

pipeline status coverage report Scrutinizer Code Quality Mutation testing badge Psalm coverage

这是一个简单的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请求。对于重大更改,请先提出问题以讨论您想要进行的更改。

请确保适当更新测试。有关详细信息,请参阅我们的贡献指南

许可证

MIT