# elasticsearch-streamer

> A programmatic and command-line utility for streaming docs from Elasticsearch indices and putting docs into indices in bulk.

Latest version **1.1.5** (published 2018-06-04) · ISC license · 0 weekly downloads

## Install

```sh
npm install elasticsearch-streamer
pnpm add elasticsearch-streamer
yarn add elasticsearch-streamer
bun add elasticsearch-streamer
```

Provides the command `ess`.

## Health

**Score 5/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score; declining downloads.

## Facts

| | |
|---|---|
| Version | 1.1.5 |
| Published | 2018-06-04 |
| First published | 2018-02-28 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 4 |
| Unpacked size | 19.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Chris Kirk |
| Maintainers | chrkirk |
| Keywords | elasticsearch, elastic, search, migration, bulk, batch, stream, scroll, cli, command line, dump |

## Links

- npm: https://www.npmjs.com/package/elasticsearch-streamer
- Repository: https://github.com/nymag/elasticsearch-streamer
- Homepage: https://github.com/nymag/elasticsearch-streamer#readme
- Issues: https://github.com/nymag/elasticsearch-streamer/issues
- npm.io page: https://npm.io/package/elasticsearch-streamer

## Dependencies (4)

- [yargs](https://npm.io/package/yargs.md) ^11.0.0
- [lodash](https://npm.io/package/lodash.md) ^4.17.5
- [highland](https://npm.io/package/highland.md) ^2.11.1
- [elasticsearch](https://npm.io/package/elasticsearch.md) ^14.2.1

## Alternatives

- [@salesforce/cli](https://npm.io/package/@salesforce/cli.md) — 389.7K weekly downloads
- [@mintlify/cli](https://npm.io/package/@mintlify/cli.md) — 208.9K weekly downloads
- [@grafana/e2e-selectors](https://npm.io/package/@grafana/e2e-selectors.md) — 128.7K weekly downloads
- [mintlify](https://npm.io/package/mintlify.md) — 112.0K weekly downloads
- [@intlayer/cli](https://npm.io/package/@intlayer/cli.md) — 22.8K weekly downloads

## Recent versions

- 1.1.5 (latest) — 2018-06-04
- 1.2.1-beta.1 (beta) — 2023-10-19
- 1.1.4 — 2018-04-06
- 1.1.3 — 2018-04-06
- 1.1.2 — 2018-04-06
- 1.1.1 — 2018-04-06
- 1.1.0 — 2018-03-28
- 1.0.1 — 2018-03-11
- 1.0.0 — 2018-03-11
- 0.1.0 — 2018-03-01
- 0.0.4 — 2018-02-28
- 0.0.3 — 2018-02-28
- 0.0.2 — 2018-02-28
- 0.0.1 — 2018-02-28

## README

# elasticsearch streamer

A programmatic and command-line utility for streaming docs from Elasticsearch indices and putting docs into indices in bulk.

## Installation

`npm install -g elasticsearch-streamer`

## Usage

Save all docs in Index A to a file:

    ess get localhost:9200/a > b.txt

Put all docs in a file into Index C:
    
    ess put localhost:9200/c < b.txt

Moves docs from Index A to Index B:
    
    ess get localhost:9200/a | ess put localhost:9200/b

Move docs from host1's index A to host2's index A:

    ess get host1:9200/a | ess put host2:9200

Move docs from host1's indices into the same indices at host2:

    ess get host1:9200 | ess put host2:9200

Stream all docs where `foo` is `bar`:

    ess get localhost:9200/a --search `{"body": {"query": {"term": {"foo": "bar"}}}}`

## Commands

### get

Streams documents out of the specified Elastic index endpoint as JSON.

Options:

* `search`: Client search options as JSON, e.g. `{"body": {"query": {"term": {"foo": "bar"}}}}`. Passed directly to `client.search`; see [ElasticSearch's Javascript API docs](https://www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/api-reference.html#api-search). `scroll` defaults to `10s` and `size` to `100`.

### put

Put documents (as JSON strings) from stdin into the specified Elastic index endpoint, and stream bulk results objects (JSON strings).

Options:

* `batch`: size of bulk batches. Default: `100`.

## Tips

Use with [jq](https://stedolan.github.io/jq/) to parse and filter JSON.

---
_Source: https://npm.io/package/elasticsearch-streamer · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
