Skip to content

Commit e73b293

Browse files
[Doc][Improve] support chinese [docs/zh/connector-v2/source/Easysearch.md] (#8843)
Co-authored-by: Gemini147258 <[email protected]>
1 parent f3617a0 commit e73b293

File tree

1 file changed

+208
-0
lines changed

1 file changed

+208
-0
lines changed

Diff for: docs/zh/connector-v2/source/Easysearch.md

+208
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,208 @@
1+
# Easysearch
2+
3+
> Easysearch 源连接器
4+
5+
## 支持引擎
6+
7+
> Spark<br/>
8+
> Flink<br/>
9+
> SeaTunnel Zeta<br/>
10+
11+
## 描述
12+
13+
用于从INFINI Easysearch读取数据。
14+
15+
## 使用依赖
16+
17+
> 依赖 [easysearch-client](https://central.sonatype.com/artifact/com.infinilabs/easysearch-client)
18+
19+
## 关键特性
20+
21+
- [x] [批处理](../../concept/connector-v2-features.md)
22+
- [ ] [流处理](../../concept/connector-v2-features.md)
23+
- [ ] [精确一次](../../concept/connector-v2-features.md)
24+
- [x] [列映射](../../concept/connector-v2-features.md)
25+
- [ ] [并行度](../../concept/connector-v2-features.md)
26+
- [ ] [支持用户自定义拆分](../../concept/connector-v2-features.md)
27+
28+
:::提示
29+
30+
支持的引擎
31+
32+
* 支持发布的所有版本 [INFINI Easysearch](https://www.infini.com/download/?product=easysearch).
33+
34+
35+
## 数据类型映射
36+
37+
| Easysearch 数据类型 | SeaTunnel 数据类型 |
38+
|-----------------------------|----------------------|
39+
| STRING<br/>KEYWORD<br/>TEXT | STRING |
40+
| BOOLEAN | BOOLEAN |
41+
| BYTE | BYTE |
42+
| SHORT | SHORT |
43+
| INTEGER | INT |
44+
| LONG | LONG |
45+
| FLOAT<br/>HALF_FLOAT | FLOAT |
46+
| DOUBLE | DOUBLE |
47+
| Date | LOCAL_DATE_TIME_TYPE |
48+
49+
### hosts [array]
50+
51+
Easysearch集群http地址,格式为“host:port”,允许指定多个主机。例如`[“host1:9200”,“host2:9200”]`
52+
53+
### username [string]
54+
55+
安全用户名。
56+
57+
### password [string]
58+
59+
安全密码。
60+
61+
### index [string]
62+
63+
Easysearch搜索索引名称,支持*模糊匹配。
64+
65+
### source [array]
66+
67+
索引字段。
68+
您可以通过指定字段“_id”来获取文档id。如果sink_id指向其他索引,由于Easysearch的限制,您需要为_id指定一个别名。
69+
若不配置源代码,则必须配置`schema`
70+
71+
### query [json]
72+
73+
Easysearch DSL.
74+
您可以控制读取数据的范围。
75+
76+
### scroll_time [String]
77+
78+
Easysearch将为滚动请求保持搜索上下文活动的时间量。
79+
80+
### scroll_size [int]
81+
82+
每次Easysearch滚动请求返回的最大请求数。
83+
84+
### schema
85+
86+
数据的结构,包括字段名和字段类型。
87+
如果不配置schema,则必须配置`source`
88+
89+
### tls_verify_certificate [boolean]
90+
91+
为HTTPS端点启用证书验证
92+
93+
### tls_verify_hostname [boolean]
94+
95+
为HTTPS端点启用主机名验证
96+
97+
### tls_keystore_path [string]
98+
99+
PEM或JKS密钥存储的路径。运行SeaTunnel的操作系统用户必须能够读取此文件。
100+
101+
### tls_keystore_password [string]
102+
103+
指定密钥存储的密钥密码
104+
105+
### tls_truststore_path [string]
106+
107+
PEM或JKS信任存储的路径。运行SeaTunnel的操作系统用户必须能够读取此文件.
108+
109+
### tls_truststore_password [string]
110+
111+
指定的信任存储的密钥密码
112+
113+
### common options
114+
115+
Source插件常用参数,详见[Source common Options](../source-common-options.md)
116+
117+
## 示例
118+
119+
简单的例子
120+
121+
```hocon
122+
Easysearch {
123+
hosts = ["localhost:9200"]
124+
index = "seatunnel-*"
125+
source = ["_id","name","age"]
126+
query = {"range":{"firstPacket":{"gte":1700407367588,"lte":1700407367588}}}
127+
}
128+
```
129+
130+
复杂的例子
131+
132+
```hocon
133+
Easysearch {
134+
hosts = ["Easysearch:9200"]
135+
index = "st_index"
136+
schema = {
137+
fields {
138+
c_map = "map<string, tinyint>"
139+
c_array = "array<tinyint>"
140+
c_string = string
141+
c_boolean = boolean
142+
c_tinyint = tinyint
143+
c_smallint = smallint
144+
c_int = int
145+
c_bigint = bigint
146+
c_float = float
147+
c_double = double
148+
c_decimal = "decimal(2, 1)"
149+
c_bytes = bytes
150+
c_date = date
151+
c_timestamp = timestamp
152+
}
153+
}
154+
query = {"range":{"firstPacket":{"gte":1700407367588,"lte":1700407367588}}}
155+
}
156+
```
157+
158+
SSL (禁用证书验证)
159+
160+
```hocon
161+
source {
162+
Easysearch {
163+
hosts = ["https://localhost:9200"]
164+
username = "admin"
165+
password = "admin"
166+
167+
tls_verify_certificate = false
168+
}
169+
}
170+
```
171+
172+
SSL (禁用主机名验证)
173+
174+
```hocon
175+
source {
176+
Easysearch {
177+
hosts = ["https://localhost:9200"]
178+
username = "admin"
179+
password = "admin"
180+
181+
tls_verify_hostname = false
182+
}
183+
}
184+
```
185+
186+
SSL (启用证书验证)
187+
188+
```hocon
189+
source {
190+
Easysearch {
191+
hosts = ["https://localhost:9200"]
192+
username = "admin"
193+
password = "admin"
194+
195+
tls_keystore_path = "${your Easysearch home}/config/certs/http.p12"
196+
tls_keystore_password = "${your password}"
197+
}
198+
}
199+
```
200+
201+
## 变更日志
202+
203+
### 下个版本
204+
205+
- 添加 Easysearch source连接器
206+
- 支持https协议
207+
- 支持DSL
208+

0 commit comments

Comments
 (0)