feat(search): align article result payloads

This commit is contained in:
2026-06-07 09:28:00 +08:00
parent 626a1f7a29
commit 9027551768
8 changed files with 194 additions and 20 deletions
+4 -1
View File
@@ -203,7 +203,10 @@ func reindexContacts(ctx context.Context, engine search.SearchEngine, db *gorm.D
var lastID uint
for {
var rows []model.Contact
q := db.WithContext(ctx).Where("id > ?", lastID).Order("id ASC").Limit(batchSize)
q := db.WithContext(ctx).
Preload("Portal").
Preload("Category").
Where("id > ?", lastID).Order("id ASC").Limit(batchSize)
if accountID != 0 {
q = q.Where("account_id = ?", accountID)
}