Skip to content

Commit debf172

Browse files
committed
Fix missing distribution
1 parent 96a9058 commit debf172

File tree

2 files changed

+15
-2
lines changed

2 files changed

+15
-2
lines changed

README.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,15 @@
11
# esdump-rs
22

3+
Dump elasticsearch indexes to blob storage, really-really fast :rocket:
4+
5+
## Installation
6+
7+
**Releases:** Grab a pre-built executable [from the releases page](https://github.com/GitGuardian/esdump-rs/releases)
8+
9+
**Docker:** `docker run ghcr.io/gitguardian/esdump-rs:latest`
10+
11+
## Usage
12+
13+
```shell
14+
cargo run --profile release http://localhost:9200 --index=test-index --batches-per-file=5 --batch-size=5000 s3://es-dump/test/ --env-file=test.env --concurrency=10
15+
```

src/elasticsearch.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ pub struct ClusterInfo {
3939

4040
#[derive(Deserialize, Debug)]
4141
pub struct ClusterVersion {
42-
pub distribution: ElasticDistribution,
42+
pub distribution: Option<ElasticDistribution>,
4343
}
4444

4545
#[derive(Deserialize, Debug)]
@@ -121,7 +121,7 @@ impl ElasticsearchClient {
121121
"Distribution detected: {:?}",
122122
cluster_info.version.distribution
123123
);
124-
cluster_info.version.distribution
124+
cluster_info.version.distribution.unwrap_or(ElasticDistribution::Elasticsearch)
125125
}
126126
};
127127

0 commit comments

Comments
 (0)