Skip to content

Commit

Permalink
add create index template
Browse files Browse the repository at this point in the history
  • Loading branch information
CharellKing committed Oct 12, 2024
1 parent 4126c70 commit e862f4f
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 3 deletions.
19 changes: 19 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,15 @@

Ela is a tool to migrator data between different elasticsearch with different versions. Elasticsearch above 5.x.x version is supported.

## Features
1. copy index settings and mappings from source index to target index.
2. create index template from source index to target index.
3. full sync data from source es to target es.
4. incremental sync data from source es to target es.
5. compare data between source es and target es.
6. import data from index file to target es index.
7. export index data from source es to index file.

## Usage

```bash
Expand Down Expand Up @@ -111,6 +120,16 @@ tasks: # tasks which is executed orderly.
index: "sample_hello" # export sample_hello index data to index file dir.
index_file_dir: "C:/Users/andy/Documents/abc"
action: export

- name: create-template
source_es: es5
target_es: es6
action: create_template # create index template from source index to target index.
index_templates:
-
name: "template_sample_hello"
pattern: ["sample_*", "index_*"] # index pattern which is used to filter index to create template.
order: 0
```
You can communicate more directly with author through the Knowledge Planet.
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module github.com/CharellKing/ela
go 1.23.0

require (
github.com/CharellKing/ela-lib v1.0.33
github.com/CharellKing/ela-lib v1.0.34
github.com/spf13/viper v1.19.0
)

Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
github.com/CharellKing/ela-lib v1.0.33 h1:tmzVopwNV49XIG59v8a7+SEKel1w0fuBWxAWHQROqJg=
github.com/CharellKing/ela-lib v1.0.33/go.mod h1:6AbIwbjxtUHawusGSbKEYJCTUQQ4vJlHDBEWThH98qs=
github.com/CharellKing/ela-lib v1.0.34 h1:yF+/8qnQuvebp/q6W1sWOu55qHtWr1g2yL7pp93uJRI=
github.com/CharellKing/ela-lib v1.0.34/go.mod h1:6AbIwbjxtUHawusGSbKEYJCTUQQ4vJlHDBEWThH98qs=
github.com/alitto/pond v1.9.1 h1:OfCpIrMyrWJpn34f647DcFmUxjK8+7Nu3eoVN/WTP+o=
github.com/alitto/pond v1.9.1/go.mod h1:xQn3P/sHTYcU/1BR3i86IGIrilcrGC2LiS+E2+CJWsI=
github.com/bmizerany/assert v0.0.0-20160611221934-b7ed37b82869 h1:DDGfHa7BWjL4YnC6+E63dPcxHo2sUxDIu8g3QgEJdRY=
Expand Down

0 comments on commit e862f4f

Please sign in to comment.