From 1addef52c5f4ca713aaed28610bc6e0e01ed5701 Mon Sep 17 00:00:00 2001 From: yggverse Date: Thu, 18 Apr 2024 10:18:16 +0300 Subject: [PATCH] fix random expression --- src/webui/search.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/webui/search.php b/src/webui/search.php index 4242a74..919f703 100644 --- a/src/webui/search.php +++ b/src/webui/search.php @@ -118,7 +118,9 @@ switch (true) // Empty query case empty($q): - $query = $index->search('')->sort('RAND()'); + $query = $index->search('') + ->expression('random', 'rand()') + ->sort('random', 'asc'); break;