Skip to content

Commit

Permalink
chore(answer): sort the CodeSearchHit after merging same-file chunks (#…
Browse files Browse the repository at this point in the history
…3335)

* chore(answer): sort the CodeSearchHit after merging same-file chunks

* fix
  • Loading branch information
wsxiaoys authored Oct 28, 2024
1 parent fcb367e commit cc0196d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions ee/tabby-webserver/src/service/answer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -572,6 +572,8 @@ pub async fn merge_code_snippets(
result.extend(file_hits);
}
}

result.sort_by(|a, b| b.scores.rrf.total_cmp(&a.scores.rrf));
result
}

Expand Down

0 comments on commit cc0196d

Please sign in to comment.