PHPackages                             eos/elasticsearch-6-connector - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. eos/elasticsearch-6-connector

ActiveLibrary[API Development](/categories/api)

eos/elasticsearch-6-connector
=============================

An abstract php connector for elasticsearch 6

1.0.0(7y ago)03.7kMITPHPPHP &gt;=7.2

Since Jan 24Pushed 7y ago5 watchersCompare

[ Source](https://github.com/eosnewmedia/Elasticsearch-6-Connector)[ Packagist](https://packagist.org/packages/eos/elasticsearch-6-connector)[ RSS](/packages/eos-elasticsearch-6-connector/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependencies (1)Versions (3)Used By (0)

Elasticsearch-6-Connector
=========================

[](#elasticsearch-6-connector)

An abstract php connector for elasticsearch 6.

```
composer require eos/elasticsearch-6-connector
```

How to use?
-----------

[](#how-to-use)

This library provides abstract classes with base functionalities. Your domain classes (e.g. repositories, event handlers or command processors) should extend the `AbstractConnector`or, if you want to use parallel indices, the `AbstractParallelIndexConnector`.

### Method provided by abstract classes

[](#method-provided-by-abstract-classes)

All methods are defined as protected and designed for internal usage in your extending class.

`AbstractConnector`:

MethodDescriptiongetConnection()Returns the current elasticsearch client instance.getIndexName($type)Returns the current index name for the given type.createIndex($type, $overwrite)Creates the given index and all pipelines with the definitions for the given type.dropIndex($type)Drops the given index an all pipelines for the type.storeDocument($type, $id, $data, $parameters)Stores a document, identified by type and id, to the current elasticsearch index. $data has to contain the document sources while $parameters could contain optional parameters for the elasticsearch request.removeDocument($type, $id)Removes a document, identified by type and id, from the current elasticsearch index.executeBulk($force)Executes all bulk actions if forced or bulk size is reached`AbstractParallelIndexConnector`:

MethodDescriptionmigrateToParallelIndex($type, $removeOldIndex)Creates the parallel index, migrates all documents from current index to parallel index, switches the current index to parallel index and then deletes the old index (if remove old index is true)reindexDocumentsToParallelIndex($hits, $type)Bulk index all hits to the parallel index for the given type.### Dependencies

[](#dependencies)

The `AbstractConnector` requires an instance of `ConnectionFactoryInterface` and an instance of `IndexDefinerInterface`(`AbstractParallelIndexConnector` instead requires `ParellelIndexDefinerInterface`).

Optional you can provide a `bulkSize`. If the `bulkSize`, which is 0 by default, is greater then 1, bulk requests with the given bulk size will be executed instead of single requests for each storage operation.

#### ConnectionFactoryInterface

[](#connectionfactoryinterface)

The connection factory is responsible for creating instances of `Elasticsearch\Client`.

The provided implementation of `ConnectionFactoryInterface` is `SimpleConnectionFactory`, which will take a single (!) `dsn` (`scheme://host:port`) as constructor argument.

#### IndexDefinerInterface

[](#indexdefinerinterface)

Index definers provide methods, which contains/creates the elasticsearch definition of a specific index.

An index definer can provide more then one index definition but only one for each type.

Following the best practices for elasticsearch &gt;= 6 each type will stored in its own index.

If you want to use one index definer for each type, your index definers could extend `AbstractIndexDefiner` and can be added to an instance of `IndexDefinerRegistry`.

If you want to prefix all your index names, you could wrap the `IndexDefinerRegistry` into an instance of `PrefixedIndexDefiner`(its also possible to wrap each single index definer into its own `PrefixedIndexDefiner`).

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity16

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity56

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

2665d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/c18ae5f024ce04dbd7c18fb39db1ebe9c4feb654d0cc6f54f206404355d2500b?d=identicon)[eosnewmedia](/maintainers/eosnewmedia)

---

Top Contributors

[![pmarien](https://avatars.githubusercontent.com/u/8394874?v=4)](https://github.com/pmarien "pmarien (1 commits)")

### Embed Badge

![Health badge](/badges/eos-elasticsearch-6-connector/health.svg)

```
[![Health](https://phpackages.com/badges/eos-elasticsearch-6-connector/health.svg)](https://phpackages.com/packages/eos-elasticsearch-6-connector)
```

###  Alternatives

[wheelpros/fitment-platform-api

Magento 2 (Open Source)

12.1k1.2k](/packages/wheelpros-fitment-platform-api)[shift31/laravel-elasticsearch

A Laravel Service Provider for the Elasticsearch API client

201369.7k1](/packages/shift31-laravel-elasticsearch)[handcraftedinthealps/elasticsearch-dsl

Elasticsearch DSL library

212.5M14](/packages/handcraftedinthealps-elasticsearch-dsl)[m6web/elasticsearch-bundle

Symfony2 Bundle on top of elasticsearch/elasticsearch-php

22631.8k2](/packages/m6web-elasticsearch-bundle)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
