This is a simple elastic indexes manager.
Install the package using Composer:
composer require devouted/elastic-index-manager
Add the following configuration to your services.yaml to register the command:
Copy code
Devouted\ElasticIndexManager\Command\ElasticIndexManagerCommand:
tags: ['console.command']
Command will search for any service that returns a Elasticsearch/Client class: like bellow:
elasticsearch.client.default:
public: true
class: Elasticsearch\ClientBuilder
factory: [ 'Elasticsearch\ClientBuilder', 'fromConfig' ]
arguments:
- { hosts: [ '%env(ELASTICSEARCH_TRANSPORT)%://%env(ELASTICSEARCH_HOST)%:%env(ELASTICSEARCH_PORT)%' ] }
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