Skip to main content
Add documents with a unique id, the natural-language text to vectorize, and typed metadata.

Adding Documents

Single Document

Batch Indexing

addMany validates every document, enforces maxBatchSize, and prevents duplicates.

Type-Safe Metadata

Define your metadata interface for compile-time safety:

Updating Documents

Update Metadata Only

Metadata-only updates are instant and don’t trigger re-embedding:

Update Text and Metadata

When text changes, VectoriaDB re-embeds the document:

Batch Updates

Keep the index current with updateMetadata, update, or updateMany. Metadata-only updates never trigger re-embedding, while text changes re-embed only the affected documents.

Removing Documents

Checking for Documents

Document Limits

VectoriaDB enforces limits to prevent DoS attacks:

Embedding Generation

Embeddings are generated automatically when you add or update documents. The process:
  1. Text is tokenized using the configured model
  2. Embeddings are generated (~100-200 documents/second)
  3. Embeddings are stored in memory (and optionally persisted)
For large imports, use addMany with appropriate maxBatchSize to avoid memory spikes.

Search

Querying the index

Persistence

Persisting embeddings

Overview

Getting started