Skip to main content

QueryLabelProvider

Trait QueryLabelProvider 

Source
pub trait QueryLabelProvider<V: VectorId>:
    Debug
    + Send
    + Sync {
    // Required method
    fn is_match(&self, vec_id: V) -> bool;

    // Provided method
    fn on_visit(&self, neighbor: Neighbor<V>) -> QueryVisitDecision<V> { ... }
}

Required Methods§

Source

fn is_match(&self, vec_id: V) -> bool

This is a query scoped provider Check if the vec_id’s label match the query label

Provided Methods§

Source

fn on_visit(&self, neighbor: Neighbor<V>) -> QueryVisitDecision<V>

Inspect a candidate before it is inserted into the frontier. Implementations can tweak the distance, reject the candidate, or request early termination. The default implementation accepts if is_match returns true, rejects otherwise.

Implementors§