Browse Source

Fix rebuild search index

Visman 4 years ago
parent
commit
8acfe4b9e9
1 changed files with 2 additions and 1 deletions
  1. 2 1
      app/Models/Post/RebuildIndex.php

+ 2 - 1
app/Models/Post/RebuildIndex.php

@@ -16,7 +16,7 @@ class RebuildIndex extends Action
             ':start' => $start,
             ':limit' => $limit,
         ];
-        $query = 'SELECT p.id, p.message, t.id as topic_id, t.subject, t.first_post_id
+        $query = 'SELECT p.id, p.message, t.id as topic_id, t.subject, t.first_post_id, t.forum_id
             FROM ::posts AS p
             INNER JOIN ::topics AS t ON t.id=p.topic_id
             WHERE p.id>=?i:start
@@ -40,6 +40,7 @@ class RebuildIndex extends Action
                     'id'            => $row['topic_id'],
                     'subject'       => $row['subject'],
                     'first_post_id' => $row['first_post_id'],
+                    'forum_id'      => $row['forum_id'],
                 ]);
                 $this->c->topics->set($topic->id, $topic);
             }