devouted / elastic-index-manager
About
v2.0.1
2026-03-18 20:43 UTC
Requires
- php: ^8.2
- elasticsearch/elasticsearch: ^8.0
- symfony/console: ^7.3
- symfony/dependency-injection: ^7.3
- symfony/framework-bundle: ^7.3
Requires (Dev)
- symfony/phpunit-bridge: ^7.3
README
This is a simple elastic indexes manager.
Installation
Install the package using Composer:
composer require devouted/elastic-index-manager
Configuration
Add the following configuration to your services.yaml to register the command:
Devouted\ElasticIndexManager\Command\ElasticIndexManagerCommand: tags: ['console.command']
Command will search for any service that returns an Elastic\Elasticsearch\Client or Elastic\Elasticsearch\ClientBuilder class, like below:
elasticsearch.client.default: public: true class: Elastic\Elasticsearch\ClientBuilder factory: [ 'Elastic\Elasticsearch\ClientBuilder', 'create' ] calls: - [ setHosts, [ [ '%env(ELASTICSEARCH_TRANSPORT)%://%env(ELASTICSEARCH_HOST)%:%env(ELASTICSEARCH_PORT)%' ] ] ]
Usage
Once installed and configured, you can use the command via the Symfony Console to manage your elastic indexes.
bin/console elasticsearch:index:manage
Select connection
run action