Skip to content

Commit

Permalink
fix ordering of the results
Browse files Browse the repository at this point in the history
  • Loading branch information
karamba228 committed Oct 2, 2024
1 parent 835dcb3 commit 5d714de
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/utils/search_packages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@ export default async function search_packages(query: string) {
packages.name,
damerau_levenshtein(name, lower(?::VARCHAR))::int AS name_distance
FROM packages
ORDER BY name_distance
ORDER BY
name_distance,
name
LIMIT 10
)
SELECT
Expand Down

0 comments on commit 5d714de

Please sign in to comment.