@onsmart/opensearch-dump
v1.0.0
Published
![Logo](https://beakyn-ui.s3.amazonaws.com/OUT_PRIMARY_LOGO_POS_RGB_BLACK_PILL.svg?2)
Downloads
21
Keywords
Readme
Onsmart Opensearch Dump
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