帮助文档 Logo
平台使用
阿里云
百度云
移动云
智算服务
教育生态
登录 →
帮助文档 Logo
平台使用 阿里云 百度云 移动云 智算服务 教育生态
登录
  1. 首页
  2. 阿里云
  3. 表格存储
  4. 开发参考
  5. API参考(数据管理)
  6. DataType定义
  7. KnnVectorQuery

KnnVectorQuery

  • DataType定义
  • 发布于 2025-04-22
  • 0 次阅读
文档编辑
文档编辑

KnnVectorQuery使用数值向量进行近似最近邻查询,可以在大规模数据集中找到最相似的数据项。

数据结构

message KnnVectorQuery {
    optional string field_name = 1;
    optional int32 top_k = 2;
    repeated float float32_query_vector = 4;
    optional Query filter = 5;
    optional float weight = 6;
}

名称

类型

是否必选

描述

field_name

string

是

向量字段名称。

top_k

int32

是

查询最邻近的topK个值。关于最大值的说明请参见多元索引限制。

float32_query_vector

float

是

要查询相似度的向量。

filter

Query

否

查询过滤器,支持组合使用任意的非向量检索的查询条件。

weight

float

否

查询条件的权重配置。

相关文章

ActionType 2025-04-22 14:32

在GetStreamRecord的响应消息中表示操作类型。 枚举取值列表

Aggregation 2025-04-22 14:32

表示单个统计聚合配置。 数据结构 message Aggregation { optional string name = 1; optional AggregationType type = 2;

AggregationResult 2025-04-22 14:32

表示单个统计聚合Aggregation的返回信息。 数据结构 message AggregationResult { optional string name = 1; optional Aggregatio

Aggregations 2025-04-22 14:32

表示统计聚合配置。 数据结构 message Aggregations { repeated Aggregation aggs = 1; }

AggregationsResult 2025-04-22 14:32

表示统计聚合中Aggregation的返回信息。 数据结构 message AggregationsResult { repeated AggregationResult agg_results = 1; }

AggregationType 2025-04-22 14:32

表示统计聚合类型。 枚举取值列表 AGG_AVG表示求平均值。 AGG_DISTINCT_COUNT表示去重统计行数,

目录
Copyright © 2025 your company All Rights Reserved. Powered by 博智数字服务平台.
闽ICP备08105208号-1