Use this file to discover all available pages before exploring further.
Cognis ships six vector stores (in-memory, FAISS, Chroma, Qdrant, Pinecone, Weaviate). Adding a seventh is a self-contained task. This page covers the shape.
SearchResult is { id, text, score, metadata }. add_texts returns the IDs the store assigned; add_vectors is the lower-level entry when the caller has already paid the embedding cost.For backends that don’t natively support a method, provide a sensible fallback (similarity_search_with_filter has one already) and document the difference.
#[cfg(feature = "vectorstore-myvector")]pub use vectorstore::myvector::{MyVectorStore, MyVectorStoreBuilder};
The cognis umbrella does not auto-glob from cognis_rag — it explicitly lists the types it re-exports at the top level. Add your types to the relevant pub use cognis_rag::{...} block in crates/cognis/src/lib.rs so users get cognis::MyVectorStore without an extra import. Existing entries there (e.g. InMemoryVectorStore, Filter) are the template.
Mocked HTTP for hosted; in-process tests for local.
// crates/cognis-rag/src/vectorstore/myvector.rs#[cfg(test)]mod tests { use super::*; use crate::FakeEmbeddings; #[tokio::test] async fn add_then_search() { // Use `wiremock` for HTTP backends, or build the local index in-process. }}
Make sure tests cover:
add_texts followed by similarity_search returns the right docs.
delete actually removes — a search after delete shouldn’t find the deleted ids.
similarity_search_with_filter either filters or falls back gracefully (and the doc page says which).
Error paths — what happens when the service is down, returns 5xx, or the collection doesn’t exist.