From: Roger Braun Date: Sat, 16 Sep 2017 09:06:55 +0000 (+0200) Subject: Add fts search index. X-Git-Url: https://git.squeep.com/?a=commitdiff_plain;h=f0257c751611f4eed076c69260a5dc4ef81a6728;p=akkoma Add fts search index. --- diff --git a/priv/repo/migrations/20170916090107_add_fts_index_to_activities.exs b/priv/repo/migrations/20170916090107_add_fts_index_to_activities.exs new file mode 100644 index 000000000..c17da8309 --- /dev/null +++ b/priv/repo/migrations/20170916090107_add_fts_index_to_activities.exs @@ -0,0 +1,8 @@ +defmodule Pleroma.Repo.Migrations.AddFTSIndexToActivities do + use Ecto.Migration + @disable_ddl_transaction true + + def change do + create index(:activities, ["(to_tsvector('english', data->'object'->>'content'))"], concurrently: true, using: :gin, name: :activities_fts) + end +end