Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

arsen/elastic-tools

Open more actions menu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

elastic-tools

CLI Utilities to export/import JSON from elasticsearch

Usage

Exporting data to json

elastic-export --host 127.0.0.1:9200 --index MyIndex --out ./data.json

The _id of the document from elastic's index will be part of the body of the exported document:

For example, this document from elastic:

{
  "_index": "users",
  "_type": "_doc",
  "_id": "1",
  "_score": 1,
  "_source": {
    "active": true,
    "name": "User 1",
    "email": "email1"
  }
}

will be exported to JSON like this:

{
  "_id": "1",
  "active": true,
  "name": "User 1",
  "email": "email1"
}

Importing data from json array

elastic-import --host 127.0.0.1:9200 --index MyIndex --data ./data.json

About

CLI Utilities to export/import data from elasticsearch as json

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Used by

Contributors

Languages

Morty Proxy This is a proxified and sanitized view of the page, visit original site.