end
def perform(%Job{args: %{"op" => "remove_from_index", "object" => object_id}}) do
- object = Pleroma.Object.get_by_id(object_id)
-
search_module = Pleroma.Config.get([Pleroma.Search, :module])
- search_module.remove_from_index(object)
+ # Fake the object so we can remove it from the index without having to keep it in the DB
+ search_module.remove_from_index(%Pleroma.Object{id: object_id})
:ok
end