parent
a21fd44f64
commit
586d3f4c0c
1 changed files with 2 additions and 1 deletions
|
@ -63,7 +63,8 @@ impl SearchResult {
|
|||
}
|
||||
|
||||
pub fn similarity(&self) -> f64 {
|
||||
total_score(&self.chunks) * (self.chunks.len() as f64 / self.total_chunks as f64)
|
||||
total_score(&self.chunks)
|
||||
* (f64::from(self.chunks.len() as u32) / f64::from(self.total_chunks))
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue