diff --git a/docs/en/connector-v2/sink/Qdrant.md b/docs/en/connector-v2/sink/Qdrant.md index 389e3133a8a..0c38c3d5cc4 100644 --- a/docs/en/connector-v2/sink/Qdrant.md +++ b/docs/en/connector-v2/sink/Qdrant.md @@ -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 diff --git a/docs/en/connector-v2/source/Qdrant.md b/docs/en/connector-v2/source/Qdrant.md index cc42356335f..c113c495519 100644 --- a/docs/en/connector-v2/source/Qdrant.md +++ b/docs/en/connector-v2/source/Qdrant.md @@ -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". diff --git a/docs/zh/connector-v2/sink/Qdrant.md b/docs/zh/connector-v2/sink/Qdrant.md new file mode 100644 index 00000000000..7d3812d9f8b --- /dev/null +++ b/docs/zh/connector-v2/sink/Qdrant.md @@ -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)了解详情。 \ No newline at end of file diff --git a/docs/zh/connector-v2/source/Qdrant.md b/docs/zh/connector-v2/source/Qdrant.md new file mode 100644 index 00000000000..d171b083f60 --- /dev/null +++ b/docs/zh/connector-v2/source/Qdrant.md @@ -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)了解详情。**** \ No newline at end of file diff --git a/seatunnel-dist/pom.xml b/seatunnel-dist/pom.xml index d8de15abd7c..7ce306eb695 100644 --- a/seatunnel-dist/pom.xml +++ b/seatunnel-dist/pom.xml @@ -589,7 +589,7 @@ ${project.version} provided - + org.apache.seatunnel connector-qdrant