Skip to main content

QueryStep

Enum QueryStep 

Source
pub enum QueryStep {
    Search {
        query: String,
        limit: usize,
    },
    VectorSearch {
        query: String,
        limit: usize,
    },
    SemanticSearch {
        text: String,
        limit: usize,
    },
    RawVectorSearch {
        vec: Vec<f32>,
        limit: usize,
    },
    TextSearch {
        query: TextQuery,
        limit: usize,
    },
    Traverse {
        direction: TraverseDirection,
        label: String,
        max_depth: usize,
        filter: Option<Predicate>,
    },
    Filter(Predicate),
}
Expand description

A single step in the query pipeline.

Eq is intentionally NOT derived — see QueryAst for the rationale.

Variants§

§

Search

Unified adaptive retrieval entry step consumed by the Phase 12 retrieval planner.

Carries the caller’s raw query string (not a parsed TextQuery): the planner decides how to interpret and route it across the text strict, text relaxed, and (future) vector branches. See crate::compile_retrieval_plan for the planner entry point.

Fields

§query: String

The raw caller-supplied query string.

§limit: usize

Maximum number of candidate rows requested by the caller.

§

VectorSearch

Nearest-neighbor search over vector embeddings.

Fields

§query: String

The search query text (to be embedded by the caller).

§limit: usize

Maximum number of candidate rows from the vector index.

§

SemanticSearch

Pack F1 semantic-search step: a natural-language query that the engine embeds at query time using the db-wide active profile embedder, then runs KNN against the per-kind vec_<kind> table.

Unlike QueryStep::VectorSearch, the text is NEVER a JSON float-array literal — the caller supplies natural language and the engine handles embedding internally.

Fields

§text: String

Natural-language query string to embed at query time.

§limit: usize

Maximum number of candidate rows from the vector KNN scan.

§

RawVectorSearch

Pack F1 raw-vector-search step: a caller-supplied dense vector that the engine binds directly to the per-kind vec_<kind> KNN scan with no embedder call. The vector’s dimension must match the active embedding profile’s dimension or the coordinator returns super::CompileError-free with a hard DimensionMismatch error at plan-time.

Fields

§vec: Vec<f32>

Caller-supplied dense vector.

§limit: usize

Maximum number of candidate rows from the vector KNN scan.

§

TextSearch

Full-text search over indexed chunk content using FathomDB’s supported safe text-query subset.

Fields

§query: TextQuery

Parsed text-search intent to be lowered into safe FTS5 syntax.

§limit: usize

Maximum number of candidate rows from the FTS index.

§

Traverse

Graph traversal following edges of the given label.

Fields

§direction: TraverseDirection

Direction to traverse.

§label: String

Edge kind to follow.

§max_depth: usize

Maximum hops from each candidate.

§filter: Option<Predicate>

Optional predicate to filter traversal results. None is exactly equivalent to the pre-Pack-2 behavior. Some(_) is not yet implemented; see Pack 3.

§

Filter(Predicate)

Row-level filter predicate.

Trait Implementations§

Source§

impl Clone for QueryStep

Source§

fn clone(&self) -> QueryStep

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for QueryStep

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl PartialEq for QueryStep

Source§

fn eq(&self, other: &QueryStep) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl StructuralPartialEq for QueryStep

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.