Skip to content

Commit 6db973e

Browse files
devlux76Copilot
andauthored
Potential fix for pull request finding
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
1 parent 8c8f099 commit 6db973e

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

cortex/Query.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,9 @@ export async function query(
135135
const combined = [...hotpathResults, ...coldResults];
136136
combined.sort((a, b) => b.score - a.score);
137137

138+
// Ensure combined results are sorted by descending score for top-K semantics.
139+
combined.sort((a, b) => b.score - a.score);
140+
138141
// Update activity for returned pages
139142
await Promise.all(combined.map(async ({ page }) => {
140143
const activity = await metadataStore.getPageActivity(page.pageId);

0 commit comments

Comments
 (0)