1
0
mirror of https://github.com/Unleash/unleash.git synced 2024-12-22 19:07:54 +01:00

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.
This commit is contained in:
Jaanus Sellin 2024-05-03 13:30:12 +03:00 committed by GitHub
parent bd0cd018c9
commit 2c05f1a0ce
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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) {