triadev / laravel-elasticsearch-migration
Elasticsearch migration for laravel.
Requires
- php: >=7.1
- ext-json: *
- elasticsearch/elasticsearch: ^6.0
- laravel/framework: 5.5.* || 5.6.* || 5.7.*
Requires (Dev)
- fzaninotto/faker: ~1.4
- mockery/mockery: ~1.0
- orchestra/testbench: ~3.0
- phpunit/phpunit: ^6.0 || ^7.0
- squizlabs/php_codesniffer: ^3.0
This package is auto-updated.
Last update: 2024-10-29 05:10:51 UTC
README
Elasticsearch migration for laravel.
Supported laravel versions
Supported elasticsearch versions
Main features
- Create index
- Update mappings
- Update settings
- Close/Open index for settings update (analyzer, ...)
- Create/Delete alias
- Reindex index
- Delete By Query
- Update by Query
Installation
Composer
composer require triadev/laravel-elasticsearch-migration
Application
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
.
Configuration
Migration via file
The migration file path must be defined in package config.
Configuration
CLI-Command
The cli-command imports the migration files to database.
php artisan triadev:es-migration:import-file-migrations {migration} {filePath}
migration
Name of the migration directory.
filePath
The already defined file path key in package config.
Events
Namespace: Triadev\EsMigration\Business\Events
Migration
Migration - Step
Roadmap
- stop migration
- audit logs
- create/delete templates
- shrink index
- split index
- rollover index
Reporting Issues
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. :)
Testing
- docker-compose -f docker-compose.yml up
- composer test
Contributing
Please see CONTRIBUTING for details.
Credits
Other
Project related links
License
The code for LaravelElasticsearchMigration is distributed under the terms of the MIT license (see LICENSE).