From 2c05f1a0ce1d82b14dc288e160cf2a36d3137922 Mon Sep 17 00:00:00 2001 From: Jaanus Sellin Date: Fri, 3 May 2024 13:30:12 +0300 Subject: [PATCH] feat: search order by final (#6976) Final rank has always been ordering correctly by default. But after 5.12 I see some issues that sometimes it is not ordered. Just to be extra sure, I am for ordering it. --- src/lib/features/feature-search/feature-search-store.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/lib/features/feature-search/feature-search-store.ts b/src/lib/features/feature-search/feature-search-store.ts index 5ba2361a3306..edb5aa5e55ef 100644 --- a/src/lib/features/feature-search/feature-search-store.ts +++ b/src/lib/features/feature-search/feature-search-store.ts @@ -288,7 +288,8 @@ class FeatureSearchStore implements IFeatureSearchStore { ); }) .joinRaw('CROSS JOIN total_features') - .whereBetween('final_rank', [offset + 1, offset + limit]); + .whereBetween('final_rank', [offset + 1, offset + limit]) + .orderBy('final_rank'); const rows = await finalQuery; stopTimer(); if (rows.length > 0) {