@onsmart/opensearch-dump

1.0.0 • Public • Published

Logo

Onsmart Opensearch Dump

Maintainability

It's just a simple CLI to import opensearch data to the local environment.

Installation

Use the package manager yarn or npm to install it.

yarn add @onsmart/opensearch-dump --dev

npm i @onsmart/opensearch-dump -D

You also can install it as a global package.

yarn global add @onsmart/opensearch-dump

npm i @onsmart/opensearch-dump --global

Setup

Create an opensearch-dump.json file on the root of project, copy and paste this template into the file, and overwrite the values

{
  "connections": {
    "input": "http://..." OR "$environment_variable" OR {
      "node": "http://..." OR "$environment_variable",
      "apiKey": "key-value" OR "$environment_variable"
    }, 
    "output": "http://..." OR "$environment_variable" OR {
      "node": "http://..." OR "$environment_variable",
      "apiKey": "key-value" OR "$environment_variable"
    }
  },
  "indexes": {
    "carts": "index-name" OR {
      "indexName": "index-name" OR "$environment_variable", // required
      "skipDataFetch": false, // optional, default: false
      "searchBody": {} // optional
    }
  }
}

If you want to use an environment variable you need to start the string with $

Usage

The CLI will always delete the local index, download the whole structure (mapping, alias, analyzer) and after that, it will download the data

> onsmart-opensearch-dump run

Deployment

To deploy this project, follow these steps:

  • Click on the "Actions Tab"
  • Choose the "Onsmart Opensearch Dump Deploy" option
  • Click on "Run Workflow"
  • Select "main" branch
  • Run workflow

License

MIT

Readme

Keywords

none

Package Sidebar

Install

npm i @onsmart/opensearch-dump

Weekly Downloads

11

Version

1.0.0

License

MIT

Unpacked Size

13.1 kB

Total Files

11

Last publish

Collaborators

  • falcaoaugustos
  • juanpujol
  • abraaoalves
  • brunolazarus
  • hileomsi