pub struct SkillMatch {
pub score: f32,
pub skill: SkillSummary,
}Expand description
A ranked result representing a skill that matched a selection query.
Fields§
§score: f32Numerical relevance score calculated using weighted lexical overlap.
The algorithm weights matches as follows:
- Name Match: +4.0
- Description Match: +2.5
- Tag Match: +2.0
- Instruction Body Match: +1.0
The final score is normalized by sqrt(unique_token_count) of the body to
ensure long-form instructions do not unfairly drown out concise skills.
skill: SkillSummaryThe lightweight summary of the matched skill.
Trait Implementations§
Source§impl Clone for SkillMatch
impl Clone for SkillMatch
Source§fn clone(&self) -> SkillMatch
fn clone(&self) -> SkillMatch
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SkillMatch
impl Debug for SkillMatch
Auto Trait Implementations§
impl Freeze for SkillMatch
impl RefUnwindSafe for SkillMatch
impl Send for SkillMatch
impl Sync for SkillMatch
impl Unpin for SkillMatch
impl UnsafeUnpin for SkillMatch
impl UnwindSafe for SkillMatch
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