Node.js/ElasticSearch:修订间差异
来自康健生活
| 第36行: | 第36行: | ||
== 迁移 == | == 迁移 == | ||
=== elasticdump === | === elasticdump === | ||
导出数据 | |||
{{Shc_out|<syntaxhighlight lang="bash"> | |||
./node_modules/elasticdump/bin/elasticdump --input http://用户名:密码@IP:端口/索引名称 --output ./索引名称_mapping.json --type=mapping</syntaxhighlight>|<syntaxhighlight lang="bash"> | |||
Fri, 28 May 2021 10:59:42 GMT | starting dump | |||
Fri, 28 May 2021 10:59:42 GMT | got 1 objects from source elasticsearch (offset: 0) | |||
Fri, 28 May 2021 10:59:42 GMT | sent 1 objects to destination file, wrote 1 | |||
Fri, 28 May 2021 10:59:42 GMT | got 0 objects from source elasticsearch (offset: 1) | |||
Fri, 28 May 2021 10:59:42 GMT | Total Writes: 1 | |||
Fri, 28 May 2021 10:59:42 GMT | dump complete | |||
</syntaxhighlight>|$|/home/kangkk}} | |||
{{Shc_out|<syntaxhighlight lang="bash"> | |||
./node_modules/elasticdump/bin/elasticdump --input http://用户名:密码@IP:端口/索引名称 --output ./索引名称.json --type=data | |||
</syntaxhighlight>|<syntaxhighlight lang="bash">Fri, 28 May 2021 11:00:01 GMT | starting dump | |||
Fri, 28 May 2021 11:00:01 GMT | got 100 objects from source elasticsearch (offset: 0) | |||
Fri, 28 May 2021 11:00:01 GMT | sent 100 objects to destination file, wrote 100 | |||
Fri, 28 May 2021 11:00:02 GMT | got 100 objects from source elasticsearch (offset: 100) | |||
Fri, 28 May 2021 11:00:02 GMT | sent 100 objects to destination file, wrote 100 | |||
... | |||
Fri, 28 May 2021 11:00:32 GMT | sent 55 objects to destination file, wrote 55 | |||
Fri, 28 May 2021 11:00:32 GMT | got 0 objects from source elasticsearch (offset: 3455) | |||
Fri, 28 May 2021 11:00:32 GMT | Total Writes: 3455 | |||
Fri, 28 May 2021 11:00:32 GMT | dump complete | |||
</syntaxhighlight>|$|/home/kangkk}} | |||
=== taskrabbit/elasticsearch-dump === | === taskrabbit/elasticsearch-dump === | ||
== 配置 == | == 配置 == | ||