Skip to main content

SearchFilter

Struct SearchFilter 

Source
#[non_exhaustive]
pub struct SearchFilter { pub source_type: Option<String>, pub kind: Option<String>, pub created_after: Option<i64>, pub status: Option<String>, pub attributes: Vec<(String, String)>, }
Expand description

G10 — closed metadata filter for Engine::search_filtered (Slice 10).

All fields are optional; a None field imposes no constraint, and an all-None filter (or None filter) is the unfiltered path whose phase-1 SQL is byte-identical to 0.7.2. This is a closed struct, not an open filter DSL (ADR-0.8.0-agent-memory-retrieval-and-identity Q1); the filter-grammar / list decision stays a later-slice concern.

created_after is a created_at >= bound lower bound in unix seconds. status is wired through to the vec0 status metadata column. vec0 TEXT metadata columns are NOT NULL-able, so the “no real population yet” state is an empty-string sentinel '' (a forced deviation from the planned “NULL plumbing”; a real population source is reserved-gap candidate 13). A status = Some("open")-style filter therefore prunes every row until that population slice lands.

Fields (Non-exhaustive)§

This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.
§source_type: Option<String>§kind: Option<String>§created_after: Option<i64>§status: Option<String>§attributes: Vec<(String, String)>

0.8.20 Slice 15e (R-20-PR, ADR-0.8.11 D3) — declared-filterable-attribute equality predicates, each (attribute_name, value). Lowered into the indexed pre-KNN vec0 metadata column attr_<hex> by [vector_filter_clause] (NOT a post-KNN json_extract). Empty ⇒ the byte-identical unfiltered path is preserved. attribute_name is the registry projection name; the encoded column is derived by [attr_vec0_column].

Trait Implementations§

Source§

impl Clone for SearchFilter

Source§

fn clone(&self) -> SearchFilter

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Debug for SearchFilter

Source§

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

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

impl Default for SearchFilter

Source§

fn default() -> SearchFilter

Returns the “default value” for a type. Read more
Source§

impl Eq for SearchFilter

Source§

impl From<&SearchFilter> for Filter

Source§

fn from(sf: &SearchFilter) -> Self

D4 sugar lowering — the shipped G10 SearchFilter re-expressed as the unified Filter. Field → term in the canonical order (source_type, kind, created_after, status) so the round-trip back to a SearchFilter (and thus the produced vec0 SQL) is byte-identical.

Source§

impl PartialEq for SearchFilter

Source§

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

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

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

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for SearchFilter

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<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. 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> Same for T

Source§

type Output = T

Should always be Self
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.