feature/elasticsearch #1

Merged
floatingghost merged 41 commits from feature/elasticsearch into develop 2021-12-12 17:37:28 +00:00
Showing only changes of commit 5a870d2c6d - Show all commits

View file

@ -61,7 +61,7 @@ def get_or_create_by_names(names) when is_list(names) do
{:ok, Repo.all(from(ht in Hashtag, where: ht.name in ^names))} {:ok, Repo.all(from(ht in Hashtag, where: ht.name in ^names))}
end) end)
|> Repo.transaction() do |> Repo.transaction() do
Pleroma.Elasticsearch.bulk_post(hashtags, :hashtags) Pleroma.Elasticsearch.maybe_bulk_post(hashtags, :hashtags)
{:ok, hashtags} {:ok, hashtags}
else else
{:error, _name, value, _changes_so_far} -> {:error, value} {:error, _name, value, _changes_so_far} -> {:error, value}