Skip to main content

GraphStoreSearch

Trait GraphStoreSearch 

Source
pub trait GraphStoreSearch: GraphStore {
    // Provided method
    fn find_nodes_in_range_iter<'a>(
        &'a self,
        property: &'a str,
        min: Option<&'a Value>,
        max: Option<&'a Value>,
        min_inclusive: bool,
        max_inclusive: bool,
    ) -> Box<dyn Iterator<Item = NodeId> + 'a> { ... }
}
Expand description

Index-backed search capabilities that an LPG store may optionally provide.

Keeps the base GraphStore scoped to graph-structure operations. Stores that back text or vector indexes implement these methods with real search logic; stores that don’t (columnar bases, projections, RDF adapters) accept the no-op defaults and the executor falls through to per-row evaluation.

§Symmetric text and vector APIs

text_search and vector_search are peer operations returning owned Vec<(NodeId, f64)>. The planner decides strategy based on has_*_index and vector_index_metric introspection; the store executes the chosen plan, falling back to brute-force internally when the request is valid but no matching index exists.

Provided Methods§

Source

fn find_nodes_in_range_iter<'a>( &'a self, property: &'a str, min: Option<&'a Value>, max: Option<&'a Value>, min_inclusive: bool, max_inclusive: bool, ) -> Box<dyn Iterator<Item = NodeId> + 'a>

Returns a lazy iterator over node ids whose property value falls within [min, max] (with the given inclusivity).

The default implementation eagerly materializes via find_nodes_in_range and chains .into_iter(). Stores with per-block zone maps (e.g. CompactStore) override this with a true lazy iterator that prunes blocks via zone-map skip checks before decoding any row, enabling Phase 4 iterator bounds to deliver real work-skip on selective queries.

Implementors§