From ad0d82d3cee27839371b3182b434d8e78092890a Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Fri, 17 Mar 2017 20:47:38 +0100 Subject: Make account search blazing fast and rank followers/followees higher in the results --- db/schema.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'db/schema.rb') diff --git a/db/schema.rb b/db/schema.rb index 4ec85ef2b..c571fa3a8 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -10,7 +10,7 @@ # # It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema.define(version: 20170304202101) do +ActiveRecord::Schema.define(version: 20170317193015) do # These are extensions that must be enabled in order to support this database enable_extension "plpgsql" @@ -43,6 +43,7 @@ ActiveRecord::Schema.define(version: 20170304202101) do t.boolean "silenced", default: false, null: false t.boolean "suspended", default: false, null: false t.boolean "locked", default: false, null: false + t.index "(((setweight(to_tsvector('simple'::regconfig, (display_name)::text), 'A'::\"char\") || setweight(to_tsvector('simple'::regconfig, (username)::text), 'B'::\"char\")) || setweight(to_tsvector('simple'::regconfig, (COALESCE(domain, ''::character varying))::text), 'C'::\"char\")))", name: "search_index", using: :gin t.index ["username", "domain"], name: "index_accounts_on_username_and_domain", unique: true, using: :btree end -- cgit