Method: projects.locations.collections.dataObjects.aggregate

聚合数据对象。

HTTP 请求

POST https://vectorsearch.googleapis.com/v1beta/{parent}/dataObjects:aggregate

路径参数

参数
parent

string

必需。要查询的集合的资源名称。格式:projects/{project}/locations/{location}/collections/{collection}

请求正文

请求正文中包含结构如下的数据:

JSON 表示法
{
  "filter": {
    object
  },
  "aggregate": enum (AggregationMethod)
}
字段
filter

object (Struct format)

可选。JSON 过滤条件表达式,例如 {"genre": {"$eq": "sci-fi"}},表示为 google.protobuf.Struct。

aggregate

enum (AggregationMethod)

必需。要应用于查询的聚合方法。

响应正文

DataObjectSearchService.AggregateDataObjects 的响应消息。

如果成功,响应正文将包含结构如下的数据:

JSON 表示法
{
  "aggregateResults": [
    {
      object
    }
  ]
}
字段
aggregateResults[]

object (Struct format)

查询的汇总结果。

授权范围

需要以下 OAuth 范围:

  • https://www.googleapis.com/auth/cloud-platform

如需了解详情,请参阅 Authentication Overview

IAM 权限

需要拥有 parent 资源的以下 IAM 权限:

  • vectorsearch.dataObjects.query

如需了解详情,请参阅 IAM 文档

AggregationMethod

聚合方法。

枚举
AGGREGATION_METHOD_UNSPECIFIED 不应使用。
COUNT 统计与过滤条件匹配的数据对象的数量。