Search by

kinetis / search-opensearch

Fiber-native non-blocking OpenSearch client construction for Kinetis, via kinetis/revolt-http-client's Revolt-backed HTTP transport.

Maintainers

Package info

github.com/kinetis-dev/search-opensearch

pkg:composer/kinetis/search-opensearch

Transparency log

Statistics

Installs: 7

Dependents: 1

Suggesters: 1

Stars: 0

Open Issues: 0

v1.0.2 2026-09-03 18:03 UTC

This package is auto-updated.

Last update: 2026-09-03 18:03:57 UTC


README

Kinetis

kinetis/search-opensearch
Non-blocking OpenSearch client construction for Kinetis

Packagist Version Packagist Downloads PHP Version License CI

Part of Kinetis, a non-blocking PHP framework for API-first applications, developed in the kinetis-dev/kinetis monorepo.

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']]]]);

Provides

Installing this package auto-registers, via extra.kinetis:

  • A container binding for OpenSearch\Client, built by OpenSearchClientFactory::fromConfig() when SEARCH_OPENSEARCH_HOST is set. Unset means the package binds nothing. The binding is lazy, so an application that never searches never builds a transport.

Nothing else. Named connections stay explicit application wiring.

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 + logsSEARCH_LOGS_OPENSEARCH_HOST. Full reference: kinetis.dev/docs/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.

fromConfig()'s optional $transportDecorator parameter wraps the fully-configured PSR-18 client right before TransportFactory gets it — the seam kinetis/telemetry's TracingOpenSearchTransport plugs into, without duplicating this method's own config-reading logic.

Installation

composer require kinetis/search-opensearch

Requires PHP 8.4+, kinetis/framework, and kinetis/revolt-http-client. Full documentation: kinetis.dev/docs/search-opensearch.html.

License

MIT — see LICENSE.