https://github.com/taskrabbit/esid
Simple command-line tool to dump document _source from ElasticSearch Lucene indexes.
https://github.com/taskrabbit/esid
Last synced: 11 months ago
JSON representation
Simple command-line tool to dump document _source from ElasticSearch Lucene indexes.
- Host: GitHub
- URL: https://github.com/taskrabbit/esid
- Owner: taskrabbit
- Created: 2014-10-30T00:16:43.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2018-08-16T15:22:42.000Z (over 7 years ago)
- Last Synced: 2025-04-18T12:19:17.877Z (11 months ago)
- Language: Java
- Size: 4.88 KB
- Stars: 4
- Watchers: 17
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# ESID: Elasticsearch Index Dumper
Simple utility to dump out the _source field values from Elasticsearch index(es).
The default output is of a form that can be imported into an Elasticsearch cluster with [ElasticDump](https://github.com/taskrabbit/elasticsearch-dump)
# Elasticsearch Home
In order to build or run `esid` the environment variable `ES_HOME` must be set, pointing to the home directory of your Elasticsearch installation. We use the Lucene and Elasticsearch Java packages from your local Elasticsearch install. Be sure that you are using the same version of Elasticsearch with ESID that your data was created with.
# Build
```
$ export ES_HOME=
$ ant build
```
# Run
```
$ export ES_HOME=
$ ./bin/run.sh
```
The output is of the form:
```
{"_type":"some_document_type_abc", "_id":"some_id_value_123", "_source":{ ...source JSON document... } }
```
which is compatible with ElasticDump.
You can list multiple indexes on the command-line and each will be dumped out in turn, e.g.
```
$ ./bin/run.sh /data/es_indexes/*/*/index
```
# Options
- `-h` help
- `-d` prefix each document output line with the document number
- `-c` emit count of documents in index, rather than dumping the index documents
- `-l` list fields of index with field metadata