fix searching comments statement timeout

master
Aevann 2024-08-11 21:50:18 +03:00
parent 8fe06def55
commit a013c7358a
2 changed files with 1 additions and 1 deletions

View File

@ -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

View File

@ -0,0 +1 @@
CREATE INDEX comments_body_ts_idx ON public.comments USING GIN (body_ts);