2021-12-20 12:38:50 -07:00
|
|
|
defmodule Pleroma.Search.SearchBackend do
|
|
|
|
@doc """
|
|
|
|
Add the object associated with the activity to the search index.
|
|
|
|
|
|
|
|
The whole activity is passed, to allow filtering on things such as scope.
|
|
|
|
"""
|
2022-12-14 05:38:48 -07:00
|
|
|
@callback add_to_index(activity :: Pleroma.Activity.t()) :: {:ok, any()} | {:error, any()}
|
2021-12-20 12:38:50 -07:00
|
|
|
|
|
|
|
@doc """
|
|
|
|
Remove the object from the index.
|
|
|
|
|
|
|
|
Just the object, as opposed to the whole activity, is passed, since the object
|
|
|
|
is what contains the actual content and there is no need for fitlering when removing
|
|
|
|
from index.
|
|
|
|
"""
|
2022-12-14 05:38:48 -07:00
|
|
|
@callback remove_from_index(object :: Pleroma.Object.t()) :: {:ok, any()} | {:error, any()}
|
2021-12-20 12:38:50 -07:00
|
|
|
end
|