pub struct QueryOptions {
pub limit: usize,
pub type_boosts: Vec<(NodeType, f32)>,
pub include_types: Vec<NodeType>,
pub exclude_types: Vec<NodeType>,
pub no_symbols: bool,
pub scope: Option<String>,
pub main_scope: String,
pub scope_main: ScopeMainInclude,
}Expand description
Options for Database::search_ranked / crate::Brain::query_ranked.
Fields§
§limit: usizeMaximum hits to return after ranking and deduplication.
type_boosts: Vec<(NodeType, f32)>Multiplicative boosts applied when node.node_type matches.
Defaults slightly prefer goals/ADRs/edge cases over raw symbols.
include_types: Vec<NodeType>If non-empty, only include these node types.
exclude_types: Vec<NodeType>Exclude these node types after ranking (applied after include filter).
no_symbols: boolConvenience: exclude NodeType::Symbol (typical for human CLI search).
scope: Option<String>When set (multi-brain), filter by owner scope (see Self::scope_main).
main_scope: StringMainBrain id used when scope is set (default main).
scope_main: ScopeMainIncludeHow much MainBrain content to mix into a scoped query (default hubs-only).
Implementations§
Source§impl QueryOptions
impl QueryOptions
Sourcepub fn human() -> Self
pub fn human() -> Self
Human-oriented defaults: exclude pure code symbols unless asked otherwise.
Sourcepub fn with_scope(self, scope: impl Into<String>) -> Self
pub fn with_scope(self, scope: impl Into<String>) -> Self
Restrict to a SubBrain (default Main mix: hubs only).
Sourcepub fn allows_scope(&self, node_scope: &str, node_id: &str) -> bool
pub fn allows_scope(&self, node_scope: &str, node_id: &str) -> bool
Whether a node passes the multi-brain scope filter.
Trait Implementations§
Source§impl Clone for QueryOptions
impl Clone for QueryOptions
Source§fn clone(&self) -> QueryOptions
fn clone(&self) -> QueryOptions
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more