Skip to content

Commit

Permalink
docs: ZH, chore: spotless
Browse files Browse the repository at this point in the history
  • Loading branch information
Anush008 committed Aug 8, 2024
1 parent 1882b6d commit 8c0d534
Show file tree
Hide file tree
Showing 5 changed files with 151 additions and 2 deletions.
2 changes: 1 addition & 1 deletion docs/en/connector-v2/sink/Qdrant.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ This connector can be used to write data into a Qdrant collection.
| BFLOAT16_VECTOR | DENSE_VECTOR |
| SPARSE_FLOAT_VECTOR | SPARSE_VECTOR |

The value of the primary key column will be used as point ID in Qdrant. If not primary key is present, a random UUID will be used.
The value of the primary key column will be used as point ID in Qdrant. If no primary key is present, a random UUID will be used.

## Options

Expand Down
2 changes: 2 additions & 0 deletions docs/en/connector-v2/source/Qdrant.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@ schema = {
}
```

The ID of the point in Qdrant will be written into the column which is marked as the primary key. It can be of type `int` or `string`.

### host [string]

The host name of the Qdrant instance. Defaults to "localhost".
Expand Down
68 changes: 68 additions & 0 deletions docs/zh/connector-v2/sink/Qdrant.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
# Qdrant

> Qdrant 数据连接器
[Qdrant](https://qdrant.tech/) 是一个高性能的向量搜索引擎和向量数据库。

该连接器可用于将数据写入 Qdrant 集合。

## 数据类型映射

| SeaTunnel 数据类型 | Qdrant 数据类型 |
|---------------------|------------------|
| TINYINT | INTEGER |
| SMALLINT | INTEGER |
| INT | INTEGER |
| BIGINT | INTEGER |
| FLOAT | DOUBLE |
| DOUBLE | DOUBLE |
| BOOLEAN | BOOL |
| STRING | STRING |
| ARRAY | LIST |
| FLOAT_VECTOR | DENSE_VECTOR |
| BINARY_VECTOR | DENSE_VECTOR |
| FLOAT16_VECTOR | DENSE_VECTOR |
| BFLOAT16_VECTOR | DENSE_VECTOR |
| SPARSE_FLOAT_VECTOR | SPARSE_VECTOR |

主键列的值将用作 Qdrant 中的点 ID。如果没有主键,则将使用随机 UUID。

## 选项

| 名称 | 类型 | 必填 | 默认值 |
|-----------------|--------|--------|---------------|
| collection_name | string || - |
| batch_size | int || 64 |
| host | string || localhost |
| port | int || 6334 |
| api_key | string || - |
| use_tls | bool || false |
| common-options | || - |

### collection_name [string]

要从中读取数据的 Qdrant 集合的名称。

### batch_size [int]

每个 upsert 请求到 Qdrant 的批量大小。

### host [string]

Qdrant 实例的主机名。默认为 "localhost"。

### port [int]

Qdrant 实例的 gRPC 端口。

### api_key [string]

用于身份验证的 API 密钥(如果设置)。

### use_tls [bool]

是否使用 TLS(SSL)连接。如果使用 Qdrant 云(https),则需要。

### 通用选项

接收插件的通用参数,请参考[源通用选项](common-options.md)了解详情。
79 changes: 79 additions & 0 deletions docs/zh/connector-v2/source/Qdrant.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
# Qdrant

> Qdrant 数据源连接器
[Qdrant](https://qdrant.tech/) 是一个高性能的向量搜索引擎和向量数据库。

该连接器可用于从 Qdrant 集合中读取数据。

## 选项

| 名称 | 类型 | 必填 | 默认值 |
|-----------------|--------|--------|---------------|
| collection_name | string || - |
| schema | config || - |
| host | string || localhost |
| port | int || 6334 |
| api_key | string || - |
| use_tls | bool || false |
| common-options | || - |

### collection_name [string]

要从中读取数据的 Qdrant 集合的名称。

### schema [config]

要将数据读取到的表的模式。

例如:

```hocon
schema = {
fields {
age = int
address = string
some_vector = float_vector
}
}
```

Qdrant 中的每个条目称为一个点。

`float_vector` 类型的列从每个点的向量中读取,其他列从与该点关联的 JSON 有效负载中读取。

如果列被标记为主键,Qdrant 点的 ID 将写入其中。它可以是 `"string"``"int"` 类型。因为 Qdrant 仅[允许](https://qdrant.tech/documentation/concepts/points/#point-ids)使用正整数和 UUID 作为点 ID。

如果集合是用单个默认/未命名向量创建的,请使用 `default_vector` 作为向量名称。

```hocon
schema = {
fields {
age = int
address = string
default_vector = float_vector
}
}
```

Qdrant 中点的 ID 将写入标记为主键的列中。它可以是 `int``string` 类型。

### host [string]

Qdrant 实例的主机名。默认为 "localhost"。

### port [int]

Qdrant 实例的 gRPC 端口。

### api_key [string]

用于身份验证的 API 密钥(如果设置)。

### use_tls [bool]

是否使用 TLS(SSL)连接。如果使用 Qdrant 云(https),则需要。

### 通用选项

源插件的通用参数,请参考[源通用选项](common-options.md)了解详情。****
2 changes: 1 addition & 1 deletion seatunnel-dist/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -589,7 +589,7 @@
<version>${project.version}</version>
<scope>provided</scope>
</dependency>

<dependency>
<groupId>org.apache.seatunnel</groupId>
<artifactId>connector-qdrant</artifactId>
Expand Down

0 comments on commit 8c0d534

Please sign in to comment.