Various search improvments.
- Create indexes on insert of the (statuses|accounts) instead of using a column modifier: Currently we use: "to_tsvector('english', ?->'object'->>'content') @@ plainto_tsquery('english', ?)", and similar for the user search.
It will induce a full scan table for every search. Not an issue for small instances, but for mastodon.host (60m+ statuses in DB), it won't fly.
- Introduce the unaccent extension for better pattern matching
Creating this issue to remember working on it ( an article to explore on elixir and FTS with pg here http://nathanmlong.com/2018/01/fast-fulltext-search-with-ecto-and-postgresql/ ).