From f0257c751611f4eed076c69260a5dc4ef81a6728 Mon Sep 17 00:00:00 2001 From: Roger Braun Date: Sat, 16 Sep 2017 11:06:55 +0200 Subject: [PATCH] Add fts search index. --- .../20170916090107_add_fts_index_to_activities.exs | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 priv/repo/migrations/20170916090107_add_fts_index_to_activities.exs 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 -- 2.45.2