Search: Add fts index on objects table.

This commit is contained in:
lain 2019-05-03 19:15:55 +02:00
commit 0e37fddd5a
5 changed files with 38 additions and 1 deletions

View file

@ -0,0 +1,8 @@
defmodule Pleroma.Repo.Migrations.AddFTSIndexToObjects do
use Ecto.Migration
def change do
drop_if_exists index(:activities, ["(to_tsvector('english', data->'object'->>'content'))"], using: :gin, name: :activities_fts)
create index(:objects, ["(to_tsvector('english', data->>'content'))"], using: :gin, name: :objects_fts)
end
end