kinetis / search-opensearch
Fiber-native non-blocking OpenSearch client construction for Kinetis, via kinetis/revolt-http-client's Revolt-backed HTTP transport.
Requires
- php: ^8.4
- kinetis/framework: ^1.6
- kinetis/revolt-http-client: ^1.0
- opensearch-project/opensearch-php: ^2.6
- symfony/http-client: ^8.0
Requires (Dev)
- infection/infection: ^0.34.2
- phpstan/phpstan: ^2.2
- phpunit/phpunit: ^11.0
- vimeo/psalm: ^6.16
README
kinetis/search-opensearch
Non-blocking OpenSearch client construction for Kinetis
Builds a real OpenSearch\Client (from opensearch-project/opensearch-php)
through OpenSearch's own TransportFactory/HttpTransport construction
path, with kinetis/revolt-http-client's Revolt-native HTTP transport
injected as its PSR-18 client instead of the default blocking one. The
returned object is the real, un-wrapped client — nothing Kinetis-specific
sits on top of it.
use Kinetis\SearchOpenSearch\OpenSearchClientFactory; $client = OpenSearchClientFactory::fromConfig($config); $client->index(['index' => 'articles', 'id' => '1', 'body' => ['title' => 'Kinetis']]); $results = $client->search(['index' => 'articles', 'body' => ['query' => ['match' => ['title' => 'Kinetis']]]]);
Configuration
SEARCH_OPENSEARCH_HOST=http://localhost:9200
| Key | Default | Purpose |
|---|---|---|
SEARCH_OPENSEARCH_HOST |
(required) | Base URI of the node. |
SEARCH_OPENSEARCH_USERNAME |
— | Basic-auth user. |
SEARCH_OPENSEARCH_PASSWORD |
— | Basic-auth password. |
SEARCH_OPENSEARCH_VERIFY_PEER |
true |
Verify the server certificate — false accepts a self-signed one on a security-enabled cluster. |
Every key is scoped — SEARCH_OPENSEARCH_HOST + logs →
SEARCH_LOGS_OPENSEARCH_HOST. Full reference:
docs.kinetis.dev/config.html.
SEARCH_OPENSEARCH_HOST is a single base URI, not a list — this
construction path has no multi-node selector/failover; put a load
balancer in front of a multi-node cluster instead.
Installation
composer require kinetis/search-opensearch
Requires PHP 8.4+, kinetis/framework, and kinetis/revolt-http-client.
Full documentation:
docs.kinetis.dev/search-opensearch.html.
License
MIT — see LICENSE.