diff --git a/files/routes/search.py b/files/routes/search.py index 783a6409e..741e52ee1 100644 --- a/files/routes/search.py +++ b/files/routes/search.py @@ -247,7 +247,6 @@ def searchcomments(v): if v.admin_level < PERMS['POST_COMMENT_MODERATION']: comments = comments.filter( Comment.is_banned==False, - Comment.deleted_utc == 0, or_( Post.draft == False, Comment.wall_user_id != None diff --git a/migrations/20240811-fix-searching-comments.sql b/migrations/20240811-fix-searching-comments.sql new file mode 100644 index 000000000..fdf6b5079 --- /dev/null +++ b/migrations/20240811-fix-searching-comments.sql @@ -0,0 +1 @@ +CREATE INDEX comments_body_ts_idx ON public.comments USING GIN (body_ts);