Socket
Socket
Sign inDemoInstall

es-schema-migration

Package Overview
Dependencies
7
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    es-schema-migration

Utility for versioned ES mapping migrations


Version published
Maintainers
1
Created

Readme

Source

es-schema-migration

Utility for managing versioned ES mapping migrations.

Usage

$ node es-schema-migration.js --help       
Usage: es-schema-migration.js <command> [options]

Commands:
  schema  Migrate index mapping to new version

Options:
  --prefix           Prefix to be used in index names.                [required]
  --index            Name of the index.                               [required]
  --version          Version to migrate to.                           [required]
  --host             Elasticsearch URL        [default: "http://localhost:9200"]
  --delete-existing  Delete existing versioned index, if exists.       [boolean]
  --from             Reindex data from specified index
  --from-previous    Reindex data from previous version
  --help             Show help                                         [boolean]

$ node es-schema-migration.js schema --help
es-schema-migration.js schema

Options:
  --prefix           Prefix to be used in index names.                [required]
  --index            Name of the index.                               [required]
  --version          Version to migrate to.                           [required]
  --host             Elasticsearch URL        [default: "http://localhost:9200"]
  --delete-existing  Delete existing versioned index, if exists.       [boolean]
  --from             Reindex data from specified index
  --from-previous    Reindex data from previous version
  --help             Show help                                         [boolean]
  --add-alias        Add alias after reindexing                        [boolean]
  --alias            Alias to use, defaults to auto generated name.

Create index foo-bar_v1 with new mapping from ./mappings/foo-bar_v1.json and add alias to foo-bar.

node es-schema-migration.js schema --prefix foo --index bar --version 1 --add-alias

Create or recreate index foo-bar_v2 with versioned mapping, reindex data from previous version (foo-bar_v1) and update alias foo-bar.

node es-schema-migration.js schema --prefix foo --index bar --version 2 --add-alias --delete-existing --from-previous

Nice, but I need to run migrations on AWS ElasticSearch Service

Sure, no problem. Check out aws-es-proxy, spin it up locally, and point es-schema-migration to the proxy.

FAQs

Last updated on 02 Nov 2018

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc