AI search engine and MCP server for bots and agents. One Rust binary indexes code, docs, logs, JSONL/CSV and PDFs for BM25 full-text, vector and hybrid search, code search without grep, agent memory and RAG. Elasticsearch-compatible API; Corpus Hub serves hundreds of reference memory corpora.
Rust agent-memoryai-agentsbm25claude-codeclicode-searchcursordatabaseelasticsearchfull-text-searchhybrid-searchjsonllocal-firstmcpmcp-servermodel-context-protocolragrustsearch-enginevector-search
//! # xerj-vector
//!
//! Vector search engine for the xerj search engine.
//!
//! Provides:
//! - [`distance`] — Distance metrics (Cosine, L2, DotProduct)
//! - [`hnsw`] — Hierarchical Navigable Small World graph index
//! - [`quantizer`]— Scalar quantization for memory-efficient storage
//! - [`search`] — High-level KNN search interface
pub mod distance;
pub mod hnsw;
pub mod quantizer;
pub mod search;
pub mod sq8_codes;
pub use distance::{compute_distance, cosine, dot_product, l2_squared, DistanceMetric};
pub use hnsw::{CompactStats, HnswIndex, HnswParams};
pub use quantizer::{
NoneQuantizer, QuantizedData, QuantizedVectors, Quantizer, Scalar8Quantizer, Sq8Params,
};
pub use search::{SearchResult, VectorSearcher};
pub use sq8_codes::Sq8CodeStore;
pub use xerj_common::Result;