pub struct CompiledSearch {
pub root_kind: String,
pub text_query: TextQuery,
pub limit: usize,
pub fusable_filters: Vec<Predicate>,
pub residual_filters: Vec<Predicate>,
pub attribution_requested: bool,
}Expand description
A compiled adaptive-search plan ready for the coordinator to execute.
Phase 2 splits the filter pipeline into two sets: fusable_filters
(pushed into the search_hits CTE so the CTE LIMIT applies after
filtering) and residual_filters (evaluated in the outer WHERE). The
coordinator emits SQL for it directly rather than reusing
crate::compile_query, because the search SELECT projects a different
row shape (score, source, snippet, projection id) than the flat query
path.
Fields§
§root_kind: StringRoot kind the caller built the query against.
text_query: TextQueryParsed text-search intent, to be lowered into safe FTS5 syntax.
limit: usizeMaximum number of candidate hits to retrieve from the FTS indexes.
fusable_filters: Vec<Predicate>Fusable predicates pushed into the search_hits CTE by the coordinator.
These evaluate against columns directly available on the nodes table
joined inside the CTE (kind, logical_id, source_ref,
content_ref).
residual_filters: Vec<Predicate>Residual predicates applied in the outer WHERE after the CTE
materializes. Currently limited to JSON-property predicates
(json_extract on n.properties).
attribution_requested: boolWhether the caller requested per-hit match attribution. Phase 5: when
true, the coordinator populates SearchHit::attribution on every
hit by resolving FTS5 match positions against the Phase 4 position
map. When false (the default), the position map is not read at all
and attribution stays None.
Trait Implementations§
Source§impl Clone for CompiledSearch
impl Clone for CompiledSearch
Source§fn clone(&self) -> CompiledSearch
fn clone(&self) -> CompiledSearch
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for CompiledSearch
impl Debug for CompiledSearch
Source§impl PartialEq for CompiledSearch
impl PartialEq for CompiledSearch
impl Eq for CompiledSearch
impl StructuralPartialEq for CompiledSearch
Auto Trait Implementations§
impl Freeze for CompiledSearch
impl RefUnwindSafe for CompiledSearch
impl Send for CompiledSearch
impl Sync for CompiledSearch
impl Unpin for CompiledSearch
impl UnsafeUnpin for CompiledSearch
impl UnwindSafe for CompiledSearch
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.