hawdb_executor/external/
vector_index.rs1use super::ExternalReadResourceContract;
5use hawdb_core::{Result, VectorRef};
6use hawdb_storage::NodeId;
7
8pub struct VectorIndexExecutionRequest<'a> {
9 pub index: &'a str,
10 pub embedding: VectorRef<'a>,
11 pub candidate_limit: usize,
12 pub top_k: usize,
13 pub mode: hawdb_core::VectorIndexQueryMode,
14 pub eligible: Option<&'a crate::vector_eligibility::VectorEligibleDomain<'a>>,
15 pub resources: ExternalReadResourceContract<'a>,
16}
17
18#[derive(Debug, Clone, Copy)]
19pub struct VectorIndexExecutionRow {
20 pub node_id: NodeId,
21 pub distance: f64,
22}
23
24pub trait VectorIndexExecutionOutput {
27 fn row_count(&self) -> usize;
28 fn row(&self, ordinal: usize) -> Result<VectorIndexExecutionRow>;
29}