pub enum SearchMethod {
Bm25,
Semantic,
Hybrid,
}Expand description
Which ranking engine a search uses.
Variants§
Bm25
Lexical BM25 over the flattened searchable text. Default; no model.
Semantic
Dense cosine similarity over embedded tool/skill text.
Hybrid
BM25 and dense arms fused by Reciprocal Rank Fusion (no reranker).
Implementations§
Trait Implementations§
Source§impl Clone for SearchMethod
impl Clone for SearchMethod
Source§fn clone(&self) -> SearchMethod
fn clone(&self) -> SearchMethod
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for SearchMethod
Source§impl Debug for SearchMethod
impl Debug for SearchMethod
Source§impl Default for SearchMethod
impl Default for SearchMethod
Source§fn default() -> SearchMethod
fn default() -> SearchMethod
Returns the “default value” for a type. Read more
Source§impl Display for SearchMethod
impl Display for SearchMethod
impl Eq for SearchMethod
Source§impl FromStr for SearchMethod
impl FromStr for SearchMethod
Source§fn from_str(s: &str) -> Result<Self, Self::Err>
fn from_str(s: &str) -> Result<Self, Self::Err>
Parse the SDK identifier: "bm25", "semantic" (with "dense"
accepted as an alias), or "hybrid".
§Errors
Any other string is a ParseSearchMethodError naming the rejected
input.
§Examples
use ratel_ai_core::SearchMethod;
assert_eq!("hybrid".parse::<SearchMethod>(), Ok(SearchMethod::Hybrid));
assert_eq!("dense".parse::<SearchMethod>(), Ok(SearchMethod::Semantic));
assert!("keyword".parse::<SearchMethod>().is_err());Source§type Err = ParseSearchMethodError
type Err = ParseSearchMethodError
The associated error which can be returned from parsing.
Source§impl PartialEq for SearchMethod
impl PartialEq for SearchMethod
impl StructuralPartialEq for SearchMethod
Auto Trait Implementations§
impl Freeze for SearchMethod
impl RefUnwindSafe for SearchMethod
impl Send for SearchMethod
impl Sync for SearchMethod
impl Unpin for SearchMethod
impl UnsafeUnpin for SearchMethod
impl UnwindSafe for SearchMethod
Blanket Implementations§
impl<T> Boilerplate for T
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> 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§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.impl<T> ErasedDestructor for Twhere
T: 'static,
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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> ToCompactString for Twhere
T: Display,
impl<T> ToCompactString for Twhere
T: Display,
Source§fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
Fallible version of
ToCompactString::to_compact_string() Read moreSource§fn to_compact_string(&self) -> CompactString
fn to_compact_string(&self) -> CompactString
Converts the given value to a
CompactString. Read more