pub fn knn_search(
conn: &Connection,
embedding: &[f32],
namespace: &str,
k: usize,
) -> Result<Vec<(i64, f32)>, AppError>Expand description
Searches the vec_entities virtual table for the k nearest neighbours.
§Errors
AppError::Database— SQLite or sqlite-vec query failure.AppError::Embedding— invalid or mismatched embedding dimension.