This package has been deprecated

Author message:

no longer maintained

@betterthings/reset-es-data

0.0.1 • Public • Published

Reset Elasticsearch Data

⚠️ Attention: there are no tests and it was created at 2am

A utility to index and reset the data in your local Elasticsearch based on a certain directory structure. It can be used to reset the database during local development / testing.

Important: Elasticsearch needs to listen at localhost:9200.

reset-es-data takes the data directory of the current working directory and does the following:

  • for each data/<index> folder it first deletes and then creates the index <index> with the mapping stored in data/<index>/_mapping.json
  • for each data/<index>/<type>/<id>.json file it indexes the document

Running the tool at the following directory structure will create the index users and add alice and bob to the users/default type.

data
  users
    _mapping.json
    default
      alice.json
      bob.json

Authors

Package Sidebar

Install

npm i @betterthings/reset-es-data

Weekly Downloads

1

Version

0.0.1

License

none

Unpacked Size

4.24 kB

Total Files

4

Last publish

Collaborators

  • laooola
  • lusbuab