Method: projects.locations.collections.dataObjects.aggregate

Menggabungkan objek data.

Permintaan HTTP

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

Parameter jalur

Parameter
parent

string

Wajib. Nama resource Koleksi yang akan dikueri. Format: projects/{project}/locations/{location}/collections/{collection}

Isi permintaan

Isi permintaan memuat data dengan struktur berikut:

Representasi JSON
{
  "filter": {
    object
  },
  "aggregate": enum (AggregationMethod)
}
Kolom
filter

object (Struct format)

Opsional. Ekspresi filter JSON, misalnya {"genre": {"$eq": "sci-fi"}}, yang ditampilkan sebagai google.protobuf.Struct.

aggregate

enum (AggregationMethod)

Wajib. Metode agregasi yang akan diterapkan pada kueri.

Isi respons

Pesan respons untuk DataObjectSearchService.AggregateDataObjects.

Jika berhasil, isi respons memuat data dengan struktur berikut:

Representasi JSON
{
  "aggregateResults": [
    {
      object
    }
  ]
}
Kolom
aggregateResults[]

object (Struct format)

Hasil gabungan kueri.

Cakupan otorisasi

Memerlukan cakupan OAuth berikut:

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

Untuk mengetahui informasi selengkapnya, lihat Authentication Overview.

Izin IAM

Memerlukan izin IAM berikut pada resource parent:

  • vectorsearch.dataObjects.query

Untuk mengetahui informasi selengkapnya, lihat dokumentasi IAM.

AggregationMethod

Metode agregasi.

Enum
AGGREGATION_METHOD_UNSPECIFIED Tidak boleh digunakan.
COUNT Menghitung jumlah objek data yang cocok dengan filter.