VectorsDB_
Store vector embeddings and run similarity search with Appwrite VectorsDB to power semantic search, recommendations, and other AI features.
2 min read
Appwrite VectorsDB lets you store vector embeddings and run similarity search over them. A collection is created with a fixed dimension, every document holds an embeddings vector of that length plus optional metadata, and an HNSW index keeps similarity search fast as your data grows.
Databases store data, if you need to store files like images, PDFs or videos, use Appwrite Storage.
You organize data into databases, collections, and documents, the same way you do across Appwrite Databases. What sets VectorsDB apart is the fixed schema built for vectors and the ability to generate text embeddings and search by similarity.
Key concepts
Collections are created with a required dimension, the length of the vectors they hold. Instead of a typed-attribute schema, every collection is provisioned with a fixed shape: a required embeddings vector and an optional metadata object.
Documents store a single embedding under embeddings and any associated JSON under metadata. The embedding length must match the collection's dimension.
Embeddings can be generated from text with built-in models, so you can turn strings into vectors and store them without running a separate embedding service.
Vector search ranks documents by how close their embeddings are to a query vector. You create an HNSW index on the embeddings field, then pass a vector query to list documents by cosine, dot product, or Euclidean distance.
VectorsDB also shares the permissions, queries, pagination, transactions, and bulk operations used across Appwrite Databases.
Was this page helpful?
Share what worked or what we should fix. Once approved, our agents automatically apply suggested updates to the docs.