GithubHelp home page GithubHelp logo

laravelelasticsearchmigration's Introduction

LaravelElasticsearchMigration

Software license Travis Coveralls CodeCov

Scrutinizer Code Quality Code Coverage Build Status

Latest stable Latest development Monthly installs

Elasticsearch migration for laravel.

Supported laravel versions

Laravel 5.5 Laravel 5.6 Laravel 5.7

Supported elasticsearch versions

Elasticsearch 6.0 Elasticsearch 6.1 Elasticsearch 6.2 Elasticsearch 6.3 Elasticsearch 6.4

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.

https://laravel.com/docs/5.7/packages

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

Key Env Value Description Example Default
filePath --- ARRAY path for file migrations [KEY => STRING, ...] null

Migration via file

The migration file path must be defined in package config.

Configuration

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

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

Documentation: Laravel Events

Namespace: Triadev\EsMigration\Business\Events

Migration

Event Status
MigrationRunning Migration is running
MigrationError Migration is failed
MigrationDone Migration is done

Migration - Step

Event Status
MigrationStepRunning Migration step is running
MigrationStepError Migration step is failed
MigrationStepDone Migration step is done

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

  1. docker-compose -f docker-compose.yml up
  2. 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).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.