From 4a4056281f96b67142bc2887d8776495a7b5a795 Mon Sep 17 00:00:00 2001 From: Visman Date: Sun, 16 Jul 2023 12:14:22 +0700 Subject: [PATCH] Reduce memory consumption when searching if the result is displayed as a list of topics For the moment when there is no valid cache. --- app/Models/Search/Execute.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/Models/Search/Execute.php b/app/Models/Search/Execute.php index 76efa2c8..a42c1c64 100644 --- a/app/Models/Search/Execute.php +++ b/app/Models/Search/Execute.php @@ -281,8 +281,8 @@ class Execute extends Method if (1 === $this->model->showAs) { $usePIdx = true; - $selectFIdx = 'p.topic_id'; - $selectFCJK = 't.id'; + $selectFIdx = 'DISTINCT p.topic_id'; + $selectFCJK = 'DISTINCT t.id'; $useTCJK = true; } else { $selectFIdx = 'sm.post_id';