fix search service null category

This commit is contained in:
Tim
2025-07-10 00:02:07 +08:00
parent cfc7f4035e
commit 24f10d008f

View File

@@ -67,7 +67,7 @@ public class SearchService {
"post", "post",
p.getId(), p.getId(),
p.getTitle(), p.getTitle(),
p.getCategory().getName(), p.getCategory() != null ? p.getCategory().getName() : null,
extractSnippet(p.getContent(), keyword, false), extractSnippet(p.getContent(), keyword, false),
null null
)), )),
@@ -76,7 +76,7 @@ public class SearchService {
"post_title", "post_title",
p.getId(), p.getId(),
p.getTitle(), p.getTitle(),
p.getCategory().getName(), p.getCategory() != null ? p.getCategory().getName() : null,
extractSnippet(p.getContent(), keyword, true), extractSnippet(p.getContent(), keyword, true),
null null
)) ))