upstash-vector-js

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Vector Documentation Skill

Vector文档技能

Quick Start

快速开始

Vector is a high‑performance vector database for storing, querying, and managing vector embeddings.
Basic workflow:
  • Install the Vector TS SDK.
  • Connect to a Vector instance.
  • Upsert vectors, query them, and manage namespaces.
Example (TypeScript):
ts
import { Index } from "@upstash/vector";
const index = new Index({
  url: process.env.UPSTASH_VECTOR_REST_URL!,
  token: process.env.UPSTASH_VECTOR_REST_TOKEN!,
});

await index.upsert([{ id: "1", vector: [0.1, 0.2], metadata: { tag: "example" } }]);

const results = await index.query({
  vector: [0.1, 0.2],
  topK: 5,
});
For full usage, refer to the linked skill files below.
Vector是一款高性能向量数据库,用于存储、查询和管理向量嵌入。
基本工作流程:
  • 安装Vector TS SDK。
  • 连接到Vector实例。
  • 插入/更新(Upsert)向量、查询向量并管理命名空间。
示例(TypeScript):
ts
import { Index } from "@upstash/vector";
const index = new Index({
  url: process.env.UPSTASH_VECTOR_REST_URL!,
  token: process.env.UPSTASH_VECTOR_REST_TOKEN!,
});

await index.upsert([{ id: "1", vector: [0.1, 0.2], metadata: { tag: "example" } }]);

const results = await index.query({
  vector: [0.1, 0.2],
  topK: 5,
});
如需完整使用说明,请参考下方链接的技能文档。

Other Skill Files

其他技能文档

TS SDK Reference

TS SDK参考文档

  • sdk-methods
    : Explains SDK commands: delete, fetch, info, query, range, reset, resumable-query, upsert
  • sdk-methods
    :讲解SDK命令:delete、fetch、info、query、range、reset、resumable-query、upsert

Features

功能特性

  • features/namespaces
    : Explains namespaces and dataset organization.
  • features/index-structure
    : Covers hybrid and sparse index structures.
  • features/filtering-and-metadata
    : Details metadata storage and server-side filtering.
Use these files for deeper guidance on SDK usage, advanced configurations, algorithms, and integrations.
  • features/namespaces
    :讲解命名空间和数据集组织方式。
  • features/index-structure
    :介绍混合索引与稀疏索引结构。
  • features/filtering-and-metadata
    :详细说明元数据存储与服务端过滤功能。
如需深入了解SDK使用方法、高级配置、算法及集成方式,请参考这些文档。