1 defmodule Pleroma.Search do
2 alias Pleroma.Workers.SearchIndexingWorker
4 def add_to_index(activity) do
5 SearchIndexingWorker.enqueue("add_to_index", %{"activity" => activity.id})
8 def remove_from_index(object) do
9 SearchIndexingWorker.enqueue("remove_from_index", %{"object" => object.id})
12 def search(query, options) do
13 search_module = Pleroma.Config.get([Pleroma.Search, :module], Pleroma.Activity)
15 search_module.search(options[:for_user], query, options)