Quickstart
Want to explore the code examples interactively? Check out our Jupyter Notebook walkthrough that demonstrates Zvec in action — including a hands-on multi-modal image search example.
Installation
pip install zvecCreate a Collection
A collection stores your documents. Each document contains scalar fields and vector embeddings.
Define a schema and create a collection:
Add Documents
Insert documents with scalar fields and vector embeddings:
Optimize a Collection
Optimize a collection to improve performance:
collection.optimize()Retrieve a Document by ID
Fetch a document directly by its id:
Search with Vectors
Basic Similarity Search
Use query() to find documents most similar to a given vector embedding:
Results are ranked by similarity score.
Filtered Similarity Search
Combine vector search with conditional filters:
Only matching documents are considered during search.
Inspect a Collection
View the collection's schema:
print(collection.schema)View the collection's statistics:
print(collection.stats)Delete a Document
Delete a document by its ID:
collection.delete(ids="book_1")Delete documents by filter condition:
collection.delete_by_filter(filter="publish_year < 1900")✨ You're all set to store, retrieve, and search vector data with Zvec!
💙 Thank you for your interest in Zvec! We hope you enjoy exploring what Zvec can do!