1 defmodule Pleroma.Search.SearchBackend do
3 Search statuses with a query, restricting to only those the user should have access to.
5 @callback search(user :: Pleroma.User.t(), query :: String.t(), options :: [any()]) :: [
10 Add the object associated with the activity to the search index.
12 The whole activity is passed, to allow filtering on things such as scope.
14 @callback add_to_index(activity :: Pleroma.Activity.t()) :: :ok | {:error, any()}
17 Remove the object from the index.
19 Just the object, as opposed to the whole activity, is passed, since the object
20 is what contains the actual content and there is no need for filtering when removing
23 @callback remove_from_index(object :: Pleroma.Object.t()) :: :ok | {:error, any()}