1. 28 Aug, 2021 1 commit
    • Tusooa Zhu's avatar
      Make activity search properly use GIN indexes · a9984c6d
      Tusooa Zhu authored
      The original approach to search in GIN indexes is to use
      `to_tsvector(text)` in the WHERE clause of the query. According to
      postgres docs [pdoc], this method does not make use of the index,
      while `to_tsvector(config, text)` does. This commit changed the
      query to use the two-argument `to_tsvector()`.
      
      [pdoc]: https://www.postgresql.org/docs/12/textsearch-tables.html
      
      To obtain the search config in use, we make a query to the db first.
      The `::regconfig::oid` hack is needed because Postgrex does not support
      regconfig type directly [postgrexbug]. I use the conversion from and to
      `oid` instead of `text` because I tested in the actual DB and querying
      using the conversion via `text` is slow just as the one-argument
      `to_tsvector()` variant.
      
      [postgrexbug]: https://github.com/elixir-ecto/postgrex/issues/502
      
      BUG: #2758
      a9984c6d
  2. 14 Aug, 2021 7 commits
  3. 13 Aug, 2021 7 commits
  4. 12 Aug, 2021 1 commit
  5. 11 Aug, 2021 4 commits
  6. 10 Aug, 2021 7 commits
  7. 09 Aug, 2021 4 commits
  8. 08 Aug, 2021 4 commits
  9. 06 Aug, 2021 5 commits