This commit is contained in:
parent
38287e77e7
commit
0e5ca89f1d
1 changed files with 6 additions and 1 deletions
|
@ -263,7 +263,12 @@ impl EmbedStore {
|
|||
.flatten()
|
||||
.collect::<Vec<SearchResult>>();
|
||||
|
||||
flat.sort_by(|a, b| b.chunks.len().cmp(&a.chunks.len()));
|
||||
flat.sort_by(|a, b| {
|
||||
b.similarity()
|
||||
.partial_cmp(&a.similarity())
|
||||
.unwrap_or(std::cmp::Ordering::Equal)
|
||||
.then(b.chunks.len().cmp(&a.chunks.len()))
|
||||
});
|
||||
flat
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue