Skip to main content

CompiledRetrievalPlan

Struct CompiledRetrievalPlan 

Source
pub struct CompiledRetrievalPlan {
    pub text: CompiledSearchPlan,
    pub vector: Option<CompiledVectorSearch>,
    pub was_degraded_at_plan_time: bool,
}
Expand description

A compiled unified retrieval plan for the Phase 12 search() entry point.

CompiledRetrievalPlan carries the bounded set of branches the engine-owned retrieval planner may run on behalf of a single search(query, limit) call: the text strict + optional text relaxed pair (carried structurally as the existing Phase 6 CompiledSearchPlan) and an optional vector branch.

v1 scope (Phase 12): the planner’s vector branch slot is structurally supported so that the coordinator’s three-block fusion path is fully wired, but crate::compile_retrieval_plan always sets vector to None. Read- time embedding of natural-language queries is not wired into the engine in v1; callers that want vector retrieval through the unified search() entry point will get text-only results until a future phase wires the embedding generator into the read path. Callers who want explicit vector retrieval today use the advanced vector_search() override (Phase 11), which takes a caller-provided vector literal.

CompiledRetrievalPlan is intentionally distinct from CompiledSearchPlan: CompiledSearchPlan is the text-only carrier consumed by text_search() and fallback_search(), and the two paths remain separate so the text-only call sites do not pay any vector-branch cost. The Phase 12 unified planner is a sibling, not a replacement.

Fields§

§text: CompiledSearchPlan

The text branches (strict + optional relaxed) of the unified plan. Always present — every search() call produces at least a strict text branch (which may itself short-circuit to empty when the query is Empty or a top-level Not).

§vector: Option<CompiledVectorSearch>

The vector branch slot. Always None in v1 per the Phase 12 scope constraint above.

§was_degraded_at_plan_time: bool

Mirrors CompiledSearchPlan::was_degraded_at_plan_time for the text branches: set when the relaxed branch’s alternatives list was truncated past crate::RELAXED_BRANCH_CAP at plan-construction time. Propagated to the result’s was_degraded flag if and only if the relaxed branch actually fires at execution time.

Trait Implementations§

Source§

impl Clone for CompiledRetrievalPlan

Source§

fn clone(&self) -> CompiledRetrievalPlan

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 CompiledRetrievalPlan

Source§

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

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

impl PartialEq for CompiledRetrievalPlan

Source§

fn eq(&self, other: &CompiledRetrievalPlan) -> 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 Eq for CompiledRetrievalPlan

Source§

impl StructuralPartialEq for CompiledRetrievalPlan

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.