You need to enable JavaScript to run this app.
文档中心
向量数据库VikingDB

向量数据库VikingDB

复制全文
下载 pdf
数据集(collection)
ListCollections
复制全文
下载 pdf
ListCollections

概述

ListCollections 用于查询数据集 Collection 列表。

请求参数

无

响应参数
declare class ListCollectionsResponse {
  readonly ListCollections: CollectionInfo[];
  readonly OriginalRequest: string;
  readonly LogId: string;
  constructor(
    ListCollections: CollectionInfo[],
    OriginalRequest: string,
    LogId: string
  );
}

CollectionInfo

字段名

类型

是否必传

说明

CollectionName

string

是

数据集名称

Description

string

否

数据集描述

CollectionAliases

string[]

否

数据集别名列表

Fields

FieldInfo[]

是

数据集字段

Stat

Stat

是

数据集状态

IndexNames

string[]

是

数据集下索引名称列表

IndexNumber

number

是

数据集下索引数量

CreateTime

string

是

数据集创建时间

UpdateTime

string

是

数据集更新时间

UpdatePerson

string

是

数据集更新人

FieldInfo

type FieldInfo =
  | ScalarFieldInfo
  | PrimaryKeyFieldInfo
  | DenseVectorFieldInfo
  | SparseVectorFieldInfo
  | TextFieldInfo
  
enum FieldType {
  Int64 = "int64",
  Float32 = "float32",
  String = "string",
  Boolean = "bool",
  ListString = "list<string>",
  ListInt64 = "list<int64>",
  /** 稠密向量 */
  DenseVector = "vector",
  /** 稀疏向量 */
  SparseVector = "sparse_vector",
  Text = "text",
}

type PipelineName =
  | "text_split_bge_large_zh"
  | "text_bge_large_zh"
  | "text_split_bge_m3"
  | "text_bge_m3"
  | "text_split_bge_large_and_m3"
  | "text_bge_large_and_m3"

ScalarFieldInfo 标量字段

字段名

类型

是否必传

说明

FieldName

string

是

字段名

FieldType

FieldType.Int64
FieldType.Float32
FieldType.String
FieldType.Boolean
FieldType.ListString
FieldType.ListInt64

是

字段类型

DefaultValue

number
string
boolean
string[]
number[]

否

字段默认值,类型需要与传入的 FieldType 对齐

PrimaryKeyFieldInfo 主键字段

字段名

类型

是否必传

说明

FieldName

string

是

字段名

FieldType

FieldType.Int64
FieldType.String

是

字段类型

IsPrimary

true

是

是否主键字段,只允许传 true

DenseVectorFieldInfo 稠密向量字段

字段名

类型

是否必传

说明

FieldName

string

是

字段名

FieldType

FieldType.DenseVector

是

字段类型

Dim

number

是

向量维度,范围 [4,4096];使用 Int8 量化索引时需为 4 的倍数

SparseVectorFieldInfo 稀疏向量字段

字段名

类型

是否必传

说明

FieldName

string

是

字段名

FieldType

FieldType.SparseVector

是

字段类型

TextFieldInfo 文本字段

字段名

类型

是否必传

说明

FieldName

string

是

字段名

FieldType

FieldType.Text

是

字段类型

PipelineName

string

否

绑定的 pipeline_name

Stat

字段名

类型

是否必传

说明

DataNumber

number

是

数据量

参考示例
import { vikingdb } from '@volcengine/openapi'

declare const service: vikingdb.VikingdbService // 替换为你初始化好的实例

const response = await service.collection.ListCollections()
  
console.log(response.ListCollections) // 数据集
最近更新时间:2026.09.08 15:30:56
这个页面对您有帮助吗?
有用
有用
无用
无用