schranz-search / seal-elasticsearch-adapter
An adapter to support elasticsearch in cmsig/seal search abstraction.
Package info
github.com/PHP-CMSIG/seal-elasticsearch-adapter
pkg:composer/schranz-search/seal-elasticsearch-adapter
Requires
- php: ^8.1
- cmsig/seal: ^0.12
- elasticsearch/elasticsearch: ^8.5.3 || ^9.0
- psr/container: ^1.0 || ^2.0
Requires (Dev)
- guzzlehttp/psr7: ^2.0
- php-cs-fixer/shim: ^3.51
- php-http/curl-client: ^2.0
- php-http/message: ^1.0
- phpstan/extension-installer: ^1.0
- phpstan/phpstan: ^2.0
- phpstan/phpstan-phpunit: ^2.0
- phpunit/phpunit: ^10.3
- rector/rector: ^2.0
Provides
- cmsig/seal-adapter-implementation: 0.12.16
Replaces
This package is auto-updated.
Last update: 2026-07-27 12:54:25 UTC
README
Your feedback is important 📘Note: This is part of the
cmsig/searchproject create issues in the main repository.
Are you working with SEAL? Let us know! | Which Search Engines do you use and why?
SEAL
Elasticsearch Adapter
The ElasticsearchAdapter write the documents into an Elasticsearch server instance.
Note: This project is heavily under development and any feedback is greatly appreciated.
Schranz Search SEAL Elasticsearch Adapter
The ElasticsearchAdapter write the documents into an Elasticsearch server instance.
This is a subtree split of the
php-cmsig/searchproject create issues in the main repository.
Installation
Use composer for install the package:
composer require cmsig/seal cmsig/seal-elasticsearch-adapter
Usage
The following code shows how to create an Engine using this Adapter:
<?php
use Elastic\Elasticsearch\ClientBuilder;
use CmsIg\Seal\Adapter\Elasticsearch\ElasticsearchAdapter;
use CmsIg\Seal\Engine;
$client = ClientBuilder::create()->setHosts([
'127.0.0.1:9200'
])->build()
$engine = new Engine(
new ElasticsearchAdapter($client),
$schema,
);
Via DSN for your favorite framework:
elasticsearch://127.0.0.1:9200
elasticsearch://127.0.0.1:9200?tls=true
elasticsearch://username:password@127.0.0.1:9200?tls=true