pub struct SearchInput {Show 19 fields
pub query: Option<String>,
pub queries: Vec<String>,
pub intent: Option<String>,
pub mode: SearchMode,
pub fast: bool,
pub limit: PositiveCount,
pub candidate_limit: PositiveCount,
pub path: Option<String>,
pub tag: Vec<String>,
pub frontmatter: Option<FrontmatterFilter>,
pub related: bool,
pub depth: u8,
pub direction: Direction,
pub scope: Vec<String>,
pub scope_only: Vec<String>,
pub scope_all: bool,
pub where_: Vec<WhereClause>,
pub since: Option<String>,
pub anchors: Option<bool>,
}Expand description
Search request.
Fields§
§query: Option<String>Primary query.
queries: Vec<String>Batch queries.
intent: Option<String>Disambiguating context for expansion, rerank, and chunk selection.
mode: SearchModeSearch mode.
fast: boolLexical-only search when true.
limit: PositiveCountResult limit.
candidate_limit: PositiveCountCandidate pool size for RRF/rerank over-fetch.
path: Option<String>Optional path scope.
tag: Vec<String>Optional tag scope.
frontmatter: Option<FrontmatterFilter>Optional frontmatter filter.
Include related notes.
depth: u8Related traversal depth.
direction: DirectionRelated traversal direction.
scope: Vec<String>Scope names to include (additive).
scope_only: Vec<String>Scope names to search exclusively (mutually exclusive with scope).
scope_all: boolInclude every configured scope, overriding default = false.
where_: Vec<WhereClause>Frontmatter --where filters (AND-composed).
since: Option<String>Filter results indexed since this timestamp.
anchors: Option<bool>Include per-result previewAnchors (BM25 + semantic). Opt-in; adds
one extra DB lookup per result so is off by default.
Implementations§
Source§impl SearchInput
impl SearchInput
Sourcepub fn from_cli_query(
query: String,
intent: Option<String>,
mode: SearchMode,
fast: bool,
limit: Option<u16>,
candidate_limit: Option<u16>,
config: Option<&SearchConfig>,
) -> TalonResult<Self>
pub fn from_cli_query( query: String, intent: Option<String>, mode: SearchMode, fast: bool, limit: Option<u16>, candidate_limit: Option<u16>, config: Option<&SearchConfig>, ) -> TalonResult<Self>
Builds a CLI search request from validated command arguments.
§Errors
Returns [TalonError::InvalidInput] when limit or candidate_limit is zero.
Sourcepub fn from_search_config(config: Option<&SearchConfig>) -> TalonResult<Self>
pub fn from_search_config(config: Option<&SearchConfig>) -> TalonResult<Self>
Builds a search request seeded from configured defaults.
§Errors
Returns [TalonError::InvalidInput] when configured limit or
candidate_limit is zero.
Trait Implementations§
Source§impl Clone for SearchInput
impl Clone for SearchInput
Source§fn clone(&self) -> SearchInput
fn clone(&self) -> SearchInput
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 SearchInput
impl Debug for SearchInput
Source§impl Default for SearchInput
impl Default for SearchInput
Source§impl<'de> Deserialize<'de> for SearchInput
impl<'de> Deserialize<'de> for SearchInput
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl PartialEq for SearchInput
impl PartialEq for SearchInput
Source§fn eq(&self, other: &SearchInput) -> bool
fn eq(&self, other: &SearchInput) -> bool
self and other values to be equal, and is used by ==.Source§impl Serialize for SearchInput
impl Serialize for SearchInput
impl Eq for SearchInput
impl StructuralPartialEq for SearchInput
Auto Trait Implementations§
impl Freeze for SearchInput
impl RefUnwindSafe for SearchInput
impl Send for SearchInput
impl Sync for SearchInput
impl Unpin for SearchInput
impl UnsafeUnpin for SearchInput
impl UnwindSafe for SearchInput
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§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more