Skip to content

Commit 7064c9c

Browse files
committed
add migrate_to_data_stream
1 parent f6d221a commit 7064c9c

File tree

5 files changed

+68
-20
lines changed

5 files changed

+68
-20
lines changed

README.md

Lines changed: 32 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,42 @@
1-
# Elasticsearch中文文档——从 v7.11 开始
1+
# Elasticsearch 中文指导文档
22

33
![license](https://img.shields.io/badge/license-CC--BY--NC-%2321BAB5)
44

5-
## 翻译目标及说明
5+
## 目录
66

7-
从官方 7.11 文档开始,翻译为中文,并发布在网站查看。
7+
- [翻译目标](#翻译目标及说明)
8+
- [在线阅读](#阅读文档)
9+
- [本地运行](#本地运行)
10+
- [感谢与支持](#感谢与支持)
11+
- [公众号](#微信公众号)
12+
- [翻译进度](#文档列表及进度)
813

9-
由于官方版本更新比较快(当前为 8.13),文档虽然是基于 7.11 开始翻译,但实际翻译过程中,后续的文档都是翻译当前的最新版本。
1014

11-
计划在全部翻译完成后,再基于完成时的最新版本,对有差异的老版本文档进行调整。
15+
## 翻译目标及说明
1216

13-
由于文档过于庞大,不会按照文档先后顺序进行翻译。将优先进行 API 文档、相关使用的翻译,然后是基本配置等,最后再是基础概念、进阶等。
17+
### 说明
1418

15-
翻译过程中,随着对相应概念的学习与理解,可能存在不同文档中对同一名词翻译时选词不同;或者对不同文档中的相同英文描述,翻译时有不同的中文表述(如一个使用子句,一个使用长句)。这些问题在翻译过程中在所难免,如果大家有发现,欢迎指出,我会将其修改一致
19+
从官方 7.11 文档开始,翻译为中文,并发布在网站
1620

17-
对某些翻译有疑义或者读起来不符合中文用词、造句,也请大家按照“**信达雅**”的标准提出 `Issue` 指正,让我们大家一起将其完善
21+
由于官方版本更新比较快(当前为 **8.16**),文档虽然是基于 7.11 开始翻译,但实际翻译时,都是翻译当前的最新版本文档
1822

19-
希望在大家的努力下,一起翻译出一份符合中文习惯,且阅读起来令人舒适的文档。这样的好文档才能帮助学习人的进步。这也是我翻译想达到的最高目标。
23+
### 计划
2024

21-
## 查看文档
25+
1. 全部翻译完成后,再基于完成时的最新版本,对有差异的老版本文档进行调整。
2226

23-
[在网站查看文档](https://elasticsearch.bookhub.tech)
27+
2. 优先进行 API 文档、相关使用的翻译,然后是基本配置等,最后再是基础概念、进阶等。
2428

25-
## 微信公众号
29+
### 目标
2630

27-
欢迎关注微信公众号:**程序员爱读书**
31+
翻译过程中,随着对相应概念的学习与理解,可能存在不同文档中对同一名词翻译时选词不同;或者对不同文档中的相同英文描述,翻译时有不同的中文表述(如一个使用子句,一个使用长句)。这些问题在翻译过程中在所难免,如果大家有发现,欢迎指出,我会将其修改一致
2832

29-
分享程序员最需要的书籍和文章,助力你掌握职业生涯的方法论
33+
对某些翻译有疑义或者读起来不符合中文用词、造句,也请大家按照“**信达雅**”的标准提出 `Issue` 指正,让我们大家一起将其完善
3034

31-
![](https://images.bookhub.tech/mp/mp_name.png)
35+
希望在大家的努力下,一起翻译出一份符合中文习惯,且阅读起来令人舒适的文档。这样的好文档才能帮助学习人的进步。这也是我翻译想达到的最高目标。
36+
37+
## 阅读文档
38+
39+
[在网站阅读](https://elasticsearch.bookhub.tech)
3240

3341
## 感谢与支持
3442

@@ -58,6 +66,14 @@
5866
|55****|2022.03.03 19:21|¥1.00|--|
5967
|zs****|2022.03.03 15:43|¥1.00|--|
6068

69+
## 微信公众号
70+
71+
欢迎关注微信公众号:**程序员爱读书**
72+
73+
分享程序员最需要的书籍和文章,助力你掌握职业生涯的方法论。
74+
75+
![](https://images.bookhub.tech/mp/mp_name.png)
76+
6177
## 本地运行
6278

6379
本文档基于 `Docusaurus` 编译后发布。本地通过 `npm` 安装 [`Docusaurus`](https://www.docusaurus.cn/) 工具后,即可本地运行。
@@ -901,7 +917,7 @@ npm run docs:dev
901917
- :heavy_check_mark: 创建数据流 [:link:](https://elasticsearch.bookhub.tech/rest_apis/data_stream_apis/create_data_stream)
902918
- :heavy_check_mark: 删除数据流 [:link:](https://elasticsearch.bookhub.tech/rest_apis/data_stream_apis/delete_data_stream)
903919
- :heavy_check_mark: 获取数据流 [:link:](https://elasticsearch.bookhub.tech/rest_apis/data_stream_apis/get_data_stream)
904-
- Migrate to data stream
920+
- :heavy_check_mark: 迁移数据流 [:link:](https://elasticsearch.bookhub.tech/rest_apis/data_stream_apis/migrate_to_data_stream)
905921
- Data stream stats
906922
- Promote data stream
907923
- :heavy_check_mark: 文档 API [:link:](https://elasticsearch.bookhub.tech/rest_apis/document_apis/)

docs/rest_apis/data_stream_apis/create_data_stream.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ PUT /_data_stream/my-data-stream
1212

1313
## 前置条件
1414

15-
- 如果 Elasticsearch 安全特性启用,你必须有 `create_index``manage`[索引权限](/secure_the_elastic_statck/user_authorization/security_privileges#索引权限)
15+
- 如果 Elasticsearch 安全特性启用,你必须有 `create_index``manage`[索引权限](/secure_the_elastic_statck/user_authorization/security_privileges#索引权限)
1616
- 已启用数据流的匹配[索引模板](/index_templates)。参阅[设置数据流](/data_streams/set_up_a_data_stream)
1717

1818
## 路径参数

docs/rest_apis/data_stream_apis/get_data_stream.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ GET /_data_stream/my-data-stream
131131
(字符串)流的匹配索引模板中当前 ILM 生命周期策略的名称。此生命周期策略在 `index.lifecycle.name` 设置中设置。
132132

133133
如果模板不包含生命周期策略,则响应中不包含此属性。
134-
134+
135135
:::note 提示
136136
数据流的后备索引可以分配不同的生命周期策略。要检索单个后备索引的生命周期策略,请使用获取索引设置 API。
137137
:::
@@ -258,4 +258,4 @@ API 返回以下响应:
258258
}
259259
```
260260

261-
# [原文链接](https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-get-data-stream.html)
261+
> [原文链接](https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-get-data-stream.html)
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# 迁移数据流 API
2+
3+
[索引别名](/aliases)转换为[数据流](/data_streams)
4+
5+
```bash
6+
POST /_data_stream/_migrate/my-logs
7+
```
8+
9+
## 请求
10+
11+
`POST /_data_stream/_migrate/<alias>`
12+
13+
## 前置条件
14+
15+
- 如果 Elasticsearch 安全特性启用,你必须有 `manage`[索引权限](/secure_the_elastic_statck/user_authorization/security_privileges#索引权限)
16+
- 已启用数据流的匹配[索引模板](/index_templates)。参阅[设置数据流](/data_streams/set_up_a_data_stream)
17+
18+
## 路径参数
19+
20+
- `<alias>`
21+
22+
(必需,字符串)要转换为数据流的索引别名的名称。别名必须符合以下条件:
23+
24+
- 别名必须有一个[写索引](/aliases#写索引)
25+
- 别名的所有索引都有一个 `date``date_nanos` 字段类型的 `@timestamp` 字段映射。
26+
- 别名必须没有任何[过滤器](/aliases#过滤别名)
27+
- 别名不得使用[自定义路由](/aliases#路由)
28+
29+
如果请求成功,则会删除别名并创建同名数据流。别名的索引将成为数据流的隐藏备份索引。别名的写索引将成为数据流的写索引。
30+
31+
> [原文链接](https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-migrate-to-data-stream.html)

sidebars.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,8 @@ const sidebars = {
158158
items: [
159159
'rest_apis/data_stream_apis/create_data_stream',
160160
'rest_apis/data_stream_apis/delete_data_stream',
161-
'rest_apis/data_stream_apis/get_data_stream'
161+
'rest_apis/data_stream_apis/get_data_stream',
162+
'rest_apis/data_stream_apis/migrate_to_data_stream'
162163
]
163164
},
164165
{

0 commit comments

Comments
 (0)