Skip to content

A Q&A platform software for teams at any scales. Whether it's a community forum, help center, or knowledge management platform, you can always count on Apache Answer.

fix(search_repo): #issues/142 the SQL is incompatible in sqlite, change SQL to fix.

kumfob97a4610d8c4
diff --git a/internal/repo/search_common/search_repo.go b/internal/repo/search_common/search_repo.go
index c94690a2..6c2f9006 100644
--- a/internal/repo/search_common/search_repo.go
+++ b/internal/repo/search_common/search_repo.go
@@ -29,7 +29,7 @@ var (
"`question`.`id` as `question_id`",
"`title`",
"`parsed_text`",
- "`question`.`created_at`",
+ "`question`.`created_at` as `created_at`",
"`user_id`",
"`vote_count`",
"`answer_count`",
@@ -42,7 +42,7 @@ var (
"`question_id`",
"`question`.`title` as `title`",
"`answer`.`parsed_text` as `parsed_text`",
- "`answer`.`created_at`",
+ "`answer`.`created_at` as `created_at`",
"`answer`.`user_id` as `user_id`",
"`answer`.`vote_count` as `vote_count`",
"0 as `answer_count`",