Keep the relay's relevance order in search results
This commit is contained in:
parent
d836ee588f
commit
0f9ce1a0ee
1 changed files with 3 additions and 1 deletions
|
|
@ -87,5 +87,7 @@ export async function searchThreads(query: string): Promise<SearchResult[]> {
|
||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
|
|
||||||
return [...byThread.values()].sort((a, b) => b.createdAt - a.createdAt);
|
// Keep the relay's relevance order (arrival order); a thread keeps the
|
||||||
|
// position of its best-ranked match
|
||||||
|
return [...byThread.values()];
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue