#[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
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
impl Clone for SearchFilter
Source§fn clone(&self) -> SearchFilter
fn clone(&self) -> SearchFilter
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for SearchFilter
impl Debug for SearchFilter
Source§impl Default for SearchFilter
impl Default for SearchFilter
Source§fn default() -> SearchFilter
fn default() -> SearchFilter
impl Eq for SearchFilter
Source§impl From<&SearchFilter> for Filter
impl From<&SearchFilter> for Filter
Source§fn from(sf: &SearchFilter) -> Self
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.