Prerequisites
Before you begin, make sure you have Zvec installed:Zvec requires Python 3.10-3.12 or Node.js 16+. See the Installation Guide for platform requirements.
Step-by-Step Guide
Define a schema
First, define the structure of your collection. A schema specifies the vector dimensions and data types.
Create and open a collection
Create a new collection and open it for operations. The collection is persisted to disk.
The path specifies where the collection data is stored. The directory will be created if it doesn’t exist.
Insert documents
Insert documents with their vector embeddings. Each document has an ID and a vector.You can also include metadata fields:
Add filters (optional)
Combine vector search with metadata filters for more precise results.Learn more about filtering in the Filtering Guide.
Complete Example
Here’s a complete working example you can run:complete_example.py
Next Steps
Now that you have Zvec running, explore these topics to build more advanced applications:Core Concepts
Learn about collections, schemas, vectors, and indexing
Dense Vectors
Work with dense embeddings for semantic search
Hybrid Search
Combine dense and sparse vectors for better results
API Reference
Explore the complete API documentation