polymathy 0.2.0

Turn search results into answers - a web service that fetches, chunks, and returns semantic content from search queries
Documentation
//! Vector indexing functionality using USearch.
//!
//! This module handles:
//! - Creating and managing vector indexes
//! - Adding embeddings to the index
//! - Performing similarity searches

use usearch::{Index, IndexOptions, MetricKind, ScalarKind, new_index};

/// Creates a new vector index with default options.
///
/// # Returns
///
/// A new `Index` instance configured for 384-dimensional embeddings
/// using inner product metric and F32 quantization.
pub fn create_index() -> Index {
    let options = IndexOptions {
        dimensions: 384, // Set the dimensions to match the embedding size
        metric: MetricKind::IP,
        quantization: ScalarKind::F32,
        connectivity: 0,
        expansion_add: 0,
        expansion_search: 0,
        multi: false,
    };
    
    new_index(&options).unwrap()
}