From: Roger Braun Date: Sun, 17 Sep 2017 12:05:53 +0000 (+0200) Subject: Add tag index. X-Git-Url: https://git.squeep.com/?a=commitdiff_plain;h=62ca2617cda39f9dcafcdd1cc64d1b2ea38271cd;p=akkoma Add tag index. This still isn't optimal, but at least it isn't super slow. --- 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