mirror of
https://github.com/LemmyNet/lemmy.git
synced 2024-11-23 12:51:18 +00:00
9bfa86d162
* add trigram index to search * add community index
10 lines
470 B
SQL
10 lines
470 B
SQL
CREATE EXTENSION IF NOT EXISTS pg_trgm;
|
|
|
|
CREATE INDEX IF NOT EXISTS idx_comment_content_trigram ON comment USING gin(content gin_trgm_ops);
|
|
|
|
CREATE INDEX IF NOT EXISTS idx_post_trigram ON post USING gin(name gin_trgm_ops, body gin_trgm_ops);
|
|
|
|
CREATE INDEX IF NOT EXISTS idx_person_trigram ON person USING gin(name gin_trgm_ops, display_name gin_trgm_ops);
|
|
|
|
CREATE INDEX IF NOT EXISTS idx_community_trigram ON community USING gin(name gin_trgm_ops, title gin_trgm_ops);
|
|
|