PHPackages                             filipgolonka/elasticsearch-reindex-bundle - 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. filipgolonka/elasticsearch-reindex-bundle

ActiveLibrary[API Development](/categories/api)

filipgolonka/elasticsearch-reindex-bundle
=========================================

Elasticsearch reindex bundle

0.3.0(8y ago)0113BSD-3-ClausePHPPHP ~7.0

Since Jun 5Pushed 8y ago1 watchersCompare

[ Source](https://github.com/filipgolonka/elasticsearch-reindex-bundle)[ Packagist](https://packagist.org/packages/filipgolonka/elasticsearch-reindex-bundle)[ Docs](https://github.com/filipgolonka/elasticsearch-reindex-bundle)[ RSS](/packages/filipgolonka-elasticsearch-reindex-bundle/feed)WikiDiscussions master Synced 2d ago

READMEChangelog (3)Dependencies (14)Versions (4)Used By (0)

Elasticsearch reindex bundle
============================

[](#elasticsearch-reindex-bundle)

Allows to reindex data in zero-downtime mode.

[![https://travis-ci.org/filipgolonka/elasticsearch-reindex-bundle](https://camo.githubusercontent.com/4f4121ae16ad18af318760c98304e3b2382da5048551737a6a0c7f557c6f3928/68747470733a2f2f7472617669732d63692e6f72672f66696c6970676f6c6f6e6b612f656c61737469637365617263682d7265696e6465782d62756e646c652e7376673f6272616e63683d6d6173746572)](https://camo.githubusercontent.com/4f4121ae16ad18af318760c98304e3b2382da5048551737a6a0c7f557c6f3928/68747470733a2f2f7472617669732d63692e6f72672f66696c6970676f6c6f6e6b612f656c61737469637365617263682d7265696e6465782d62756e646c652e7376673f6272616e63683d6d6173746572)

How is it working?
------------------

[](#how-is-it-working)

See

Long story short:

- create new index
- fill in with data
- point an alias to new index
- remove old index

Your application has to use alias name, not index name directly.

Requirements
------------

[](#requirements)

- elasticsearch/elasticsearch &gt;=2.0, &lt;5.0
- symfony/config
- PHP &gt;7.0

Installation
------------

[](#installation)

- `composer require filipgolonka/elasticsearch-reindex-bundle`
- add following lines to `app/AppKernel.php`

```
$bundles = [
    // ...
    new FilipGolonka\ElasticsearchReindexBundle\FilipGolonkaElasticsearchReindexBundle(),
    // ...
];

```

- add config options to `app/config/config.yml`

```
filip_golonka_elasticsearch_reindex:
    alias_name: 'alias_name'
    elasticsearch_client: 'elasticsearch.client'
    index_name_template: 'my-index-%s'
    index_type: my-type
    mapping: '%elasticsearch_mapping%'
    reindex_command_name: 'app.command.elastic_search.importer.all_to'
    settings: '%elasticsearch_settings%'

```

where: `alias_name` - alias used by your application `elasticsearch_client` - DI container id, which points to `\Elasticsearch\Client` object `index_name_template` - template used for creating new index. It has to be sprintf pattern with one placement (in the other words - contains one and only one `%s`) `index_type` - document types used in your application `mapping` - Elasticsearch mapping for newly created index `reindex_command_name` - DI container id, which points to `\Symfony\Component\Console\Command\Command` object. This command has to accept one and only one argument: `index_name`. `settings` - Elasticsearch settings for newly created index

Elasticsearch mapping and settings example
------------------------------------------

[](#elasticsearch-mapping-and-settings-example)

```
parameters:
    elasticsearch_mapping:
        dynamic: "environment == 'dev' ? 'strict' : false"
        properties:
            id:
                type: string
            date:
                type: date
            gallery:
                type: object
                properties:
                    image:
                        type: string

    elasticsearch_settings:
        number_of_shards: 1,
        number_of_replicas: 0,
        analysis:
            analyzer:
                analyzer_keyword:
                    tokenizer: 'keyword'
                    filter: 'lowercase'

```

Development
-----------

[](#development)

Add your functionality, but before submitting Pull Request - make sure, that you didn't break the quality of code.

First - run code static analyses tools:

```
bin/phing quality

```

Second - run tests:

```
bin/phing tests

```

Before submitting Pull Request, make sure that your code is covered with PhpSpec and Behat tests.

### How to run Behat locally?

[](#how-to-run-behat-locally)

Behat tests if the bundle logic works properly with connection to Elasticsearch, so Elasticsearch url is needed to run tests. How to do it?

```
export ELASTICSEARCH_URL=http://localhost:9200 && bin/behat

```

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity50

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

Every ~0 days

Total

3

Last Release

3264d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/855c55ef5e845919f980318fc0c38e688acba842a603598e956dada8d7a736a0?d=identicon)[filipgolonka](/maintainers/filipgolonka)

---

Top Contributors

[![filipgolonka](https://avatars.githubusercontent.com/u/2419247?v=4)](https://github.com/filipgolonka "filipgolonka (11 commits)")

###  Code Quality

TestsBehat

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/filipgolonka-elasticsearch-reindex-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/filipgolonka-elasticsearch-reindex-bundle/health.svg)](https://phpackages.com/packages/filipgolonka-elasticsearch-reindex-bundle)
```

###  Alternatives

[sylius/sylius

E-Commerce platform for PHP, based on Symfony framework.

8.4k5.6M651](/packages/sylius-sylius)[simplesamlphp/simplesamlphp

A PHP implementation of a SAML 2.0 service provider and identity provider.

1.1k12.4M193](/packages/simplesamlphp-simplesamlphp)[sulu/sulu

Core framework that implements the functionality of the Sulu content management system

1.3k1.3M152](/packages/sulu-sulu)[prestashop/prestashop

PrestaShop is an Open Source e-commerce platform, committed to providing the best shopping cart experience for both merchants and customers.

9.0k15.4k](/packages/prestashop-prestashop)[contao/core-bundle

Contao Open Source CMS

1231.6M2.4k](/packages/contao-core-bundle)[ec-cube/ec-cube

EC-CUBE EC open platform.

78527.0k1](/packages/ec-cube-ec-cube)

PHPackages © 2026

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