Expand description
Vector search operators.
This module provides operators for vector similarity search that can be composed into query pipelines. Operators implement an iterator-like interface for streaming results.
§Operators
AnnScan- Approximate nearest neighbor search using HNSW indexExactKnn- Brute force k-NN search for small sets or validationVectorFilter- Post-filter vector results by predicates
§Multi-Vector / ColBERT
The [maxsim] module provides MaxSim scoring for ColBERT-style late interaction
models, where each query/document is represented as multiple token embeddings.
§Hybrid Search
The hybrid module provides support for combining dense and sparse vector
similarity scores using weighted combinations or reciprocal rank fusion.
§Iterator Design
All operators implement the VectorOperator trait, which provides a
streaming interface for results:
use manifoldb_vector::ops::{VectorOperator, AnnScan};
let mut scan = AnnScan::new(index, query, k)?;
while let Some(result) = scan.next()? {
println!("Entity: {:?}, Distance: {}", result.entity_id, result.distance);
}§Search Modes
The operators support two primary search modes:
- Find K nearest: Return the K closest vectors to the query
- Find within distance: Return all vectors within distance D of the query
§Combining with Graph Traversal
Vector operators can be combined with graph traversal to find similar neighbors or filter graph results by vector similarity.
Re-exports§
pub use hybrid::merge_results;pub use hybrid::reciprocal_rank_fusion;pub use hybrid::HybridConfig;pub use hybrid::HybridMatch;pub use maxsim::maxsim;pub use maxsim::maxsim_batch;pub use maxsim::maxsim_cosine;pub use maxsim::MaxSimScorer;
Modules§
- hybrid
- Hybrid dense+sparse vector search.
- maxsim
- MaxSim scoring for ColBERT-style late interaction models.
Structs§
- AnnScan
- Approximate nearest neighbor search operator.
- Exact
Knn - Exact k-NN search operator using brute force.
- Filter
Builder - Builder for composing multiple filters.
- Search
Config - Configuration for search operations.
- Vector
Filter - Filter operator for post-filtering vector search results.
- Vector
Match - A match from a vector search operation.
Traits§
- Vector
Operator - Trait for vector search operators.