pub struct RuleSearchRetrievalOptions<'a> {
pub query: &'a str,
pub lexical_query: &'a str,
pub top_k: usize,
pub confidence_map: Option<&'a HashMap<String, f64>>,
pub age_days_map: Option<&'a HashMap<String, f32>>,
pub target_file: Option<&'a str>,
pub repo_scopes: &'a [String],
pub ann_enabled: bool,
pub embedding_timeout: Option<Duration>,
pub cold_start_retry: bool,
pub adaptive_prune: bool,
}Expand description
Options for the CLI/MCP search-style retrieval helper. The helper fans
out across repo scopes, applies the shared confidence + age decay inputs
at the retrieve_rules_with_confidence layer, merges duplicates, then
applies the same lexical re-rank used by the MCP search tools.
Fields§
§query: &'a str§lexical_query: &'a str§top_k: usize§confidence_map: Option<&'a HashMap<String, f64>>§age_days_map: Option<&'a HashMap<String, f32>>§target_file: Option<&'a str>§repo_scopes: &'a [String]§ann_enabled: bool§embedding_timeout: Option<Duration>§cold_start_retry: boolRetry a timed-out query embed once with a longer cold-absorbing budget
(see embed_query_aligned_to_index). Set by the human-waiting CLI path
so a cold first recall keeps semantic ranking; left false by the
latency-critical hook/MCP callers that must fast-degrade to lexical.
adaptive_prune: boolAuto Trait Implementations§
impl<'a> Freeze for RuleSearchRetrievalOptions<'a>
impl<'a> RefUnwindSafe for RuleSearchRetrievalOptions<'a>
impl<'a> Send for RuleSearchRetrievalOptions<'a>
impl<'a> Sync for RuleSearchRetrievalOptions<'a>
impl<'a> Unpin for RuleSearchRetrievalOptions<'a>
impl<'a> UnsafeUnpin for RuleSearchRetrievalOptions<'a>
impl<'a> UnwindSafe for RuleSearchRetrievalOptions<'a>
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
Mutably borrows from an owned value. Read more
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
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>
Converts
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>
Converts
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