From 3151b260e27c1d3143b36a68b700bf3884ae9808 Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Sun, 6 Nov 2022 06:16:34 +0100 Subject: [PATCH 1/2] Fix not using GIN index for account search queries (#19830) --- app/models/account.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/account.rb b/app/models/account.rb index da0ee2336..3647b8225 100644 --- a/app/models/account.rb +++ b/app/models/account.rb @@ -445,7 +445,7 @@ class Account < ApplicationRecord class << self DISALLOWED_TSQUERY_CHARACTERS = /['?\\:‘’]/.freeze - TEXTSEARCH = "(setweight(to_tsvector('simple', accounts.display_name), 'A') || setweight(to_tsvector('simple', accounts.username), 'A') || setweight(to_tsvector('simple', coalesce(accounts.domain, '')), 'C'))" + TEXTSEARCH = "(setweight(to_tsvector('simple', accounts.display_name), 'A') || setweight(to_tsvector('simple', accounts.username), 'B') || setweight(to_tsvector('simple', coalesce(accounts.domain, '')), 'C'))" REPUTATION_SCORE_FUNCTION = '(greatest(0, coalesce(s.followers_count, 0)) / (greatest(0, coalesce(s.following_count, 0)) + 1.0))' FOLLOWERS_SCORE_FUNCTION = 'log(greatest(0, coalesce(s.followers_count, 0)) + 2)' From 5187e4e758b0636432d984d1a95a310cac536205 Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Sun, 6 Nov 2022 06:59:56 +0100 Subject: [PATCH 2/2] Bump version to 4.0.0rc2 (#19831) --- lib/mastodon/version.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/mastodon/version.rb b/lib/mastodon/version.rb index 179490098..2b0b84b8f 100644 --- a/lib/mastodon/version.rb +++ b/lib/mastodon/version.rb @@ -17,7 +17,7 @@ module Mastodon end def flags - 'rc1' + 'rc2' end def suffix