aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoger Braun <roger@rogerbraun.net>2017-09-17 14:05:53 +0200
committerRoger Braun <roger@rogerbraun.net>2017-09-17 14:05:53 +0200
commit62ca2617cda39f9dcafcdd1cc64d1b2ea38271cd (patch)
treeae15fb3aa04a92991d08c096cfb92bfdf8a2f0a0
parent6000f61727a4a9f07a4ddb19878696f764915cad (diff)
downloadpleroma-62ca2617cda39f9dcafcdd1cc64d1b2ea38271cd.tar.gz
Add tag index.
This still isn't optimal, but at least it isn't super slow.
-rw-r--r--priv/repo/migrations/20170917120416_add_tag_index.exs9
1 files changed, 9 insertions, 0 deletions
diff --git a/priv/repo/migrations/20170917120416_add_tag_index.exs b/priv/repo/migrations/20170917120416_add_tag_index.exs
new file mode 100644
index 000000000..d9391dda9
--- /dev/null
+++ b/priv/repo/migrations/20170917120416_add_tag_index.exs
@@ -0,0 +1,9 @@
+defmodule Pleroma.Repo.Migrations.AddTagIndex do
+ use Ecto.Migration
+
+ @disable_ddl_transaction true
+
+ def change do
+ create index(:activities, ["(data #> '{\"object\",\"tag\"}')"], concurrently: true, using: :gin, name: :activities_tags)
+ end
+end