Elasticsearch migration for laravel.
- Create index
- Update mappings
- Update settings
- Close/Open index for settings update (analyzer, ...)
- Create/Delete alias
- Reindex index
- Delete By Query
- Update by Query
composer require triadev/laravel-elasticsearch-migration
The package is registered through the package discovery of laravel and Composer.
Once installed you can now publish your config file and set your correct configuration for using the package.
php artisan vendor:publish --provider="Triadev\EsMigration\Provider\ElasticsearchMigrationServiceProvider" --tag="config"
This will create a file config/triadev-elasticsearch-migration.php
.
Key | Env | Value | Description | Example | Default |
---|---|---|---|---|---|
filePath | --- | ARRAY | path for file migrations | [KEY => STRING, ...] | null |
The migration file path must be defined in package config.
Key | Value | Description | Default |
---|---|---|---|
type | STRING | migration type | --- |
params | ARRAY | configuration | --- |
priority | INTEGER | order of migration steps | 1 |
stopOnFailure | BOOL | stop on failure at migration | true |
The cli-command imports the migration files to database.
php artisan triadev:es-migration:import-file-migrations {migration} {filePath}
Name of the migration directory.
The already defined file path key in package config.
Namespace: Triadev\EsMigration\Business\Events
Event | Status |
---|---|
MigrationRunning | Migration is running |
MigrationError | Migration is failed |
MigrationDone | Migration is done |
Event | Status |
---|---|
MigrationStepRunning | Migration step is running |
MigrationStepError | Migration step is failed |
MigrationStepDone | Migration step is done |
- stop migration
- audit logs
- create/delete templates
- shrink index
- split index
- rollover index
If you do find an issue, please feel free to report it with GitHub's bug tracker for this project.
Alternatively, fork the project and make a pull request. :)
- docker-compose -f docker-compose.yml up
- composer test
Please see CONTRIBUTING for details.
The code for LaravelElasticsearchMigration is distributed under the terms of the MIT license (see LICENSE).