New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

elasticexport

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

elasticexport

Node Js Elasticsearch export and import module

latest
Source
npmnpm
Version
1.2.1
Version published
Maintainers
1
Created
Source

ElasticSearch Dump Operations For version-6

Required Node.js for work.

$ npm install -g elasticexport

Capabilities

Export and Import Mapping Option Added

if you add mapping option to your export and import command mapping and settings also export and import.

Export Data

Options

  • -host http:// is not required host and port is required
  • -path Output file for export operation .json extension is required
  • export is required to process as export mode
  • -index is not required. If it is added export specific index otherwise export all indexes
  • -fileSize default 4MB. If written data more than 4MB next data wtire in different file. Example usage
    elasticexport export -host localhost:9200 -index test -path /Users/xxx/Desktop/test.json -fileSize 4096

Import Data

Options

  • -host http:// is not required host and port is required
  • -path Inpot file for export operation .json extension is required. If pathn.json file exists program read sequentially
  • import is required to process as import mode
  • -index is not required. If it is added import data to specific index otherwise if export data runs with all options import process with same indexes, otherwise error occured Example usage
    elasticexport import -host localhost:9200 -index test_document -path /Users/xxx/Desktop/test.json 

Clear Index

Options

  • -host http:// is not required host and port is required
  • delete is required to process as import mode
  • -index is cleared index name Example usage
    elasticexport delete -host localhost:9200 -index test 

Also user import and delete both it works first delete given index than import all data in also given index

elasticexport delete import -host localhost:9200 -index test_document -path /Users/xxx/Desktop/test.json

Module Usage

Node projects use these options as module. In type script

import { exportData, importData, clearIndex } from 'elasticexport';
exportData({
    host: 'localhost:9200',
    path: '/Users/xxx/Desktop/test.json',
    index: 'test'
});
clearIndex({
    host: 'localhost:9200',
    index: 'test2'
});
importData({
    host: 'localhost:9200',
    path: '/Users/xxx/Desktop/test.json',
    index: 'test2'
});

Keywords

elasticsearch

FAQs

Package last updated on 30 Apr 2019

Did you know?

Socket

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