mirror of
https://git.pleroma.social/pleroma/pleroma.git
synced 2025-04-24 05:47:41 -04:00
Add missing callbacks
This commit is contained in:
parent
ba0c104810
commit
3378905099
1 changed files with 19 additions and 0 deletions
|
@ -6,6 +6,7 @@ defmodule Pleroma.Search.Elasticsearch do
|
|||
@behaviour Pleroma.Search.SearchBackend
|
||||
|
||||
alias Pleroma.Activity
|
||||
alias Pleroma.Config
|
||||
alias Pleroma.Object.Fetcher
|
||||
alias Pleroma.Search.Elasticsearch.Parsers
|
||||
alias Pleroma.Web.ActivityPub.Visibility
|
||||
|
@ -40,6 +41,7 @@ defmodule Pleroma.Search.Elasticsearch do
|
|||
end
|
||||
end
|
||||
|
||||
@impl true
|
||||
def search(user, query, options) do
|
||||
limit = Enum.min([Keyword.get(options, :limit), 40])
|
||||
offset = Keyword.get(options, :offset, 0)
|
||||
|
@ -88,4 +90,21 @@ defmodule Pleroma.Search.Elasticsearch do
|
|||
def remove_from_index(object) do
|
||||
Elasticsearch.delete_document(Pleroma.Search.Elasticsearch.Cluster, object, "activities")
|
||||
end
|
||||
|
||||
@impl true
|
||||
def create_index, do: :ok
|
||||
|
||||
@impl true
|
||||
def drop_index, do: :ok
|
||||
|
||||
@impl true
|
||||
def healthcheck_endpoints do
|
||||
endpoint =
|
||||
Config.get([Pleroma.Search.Elasticsearch.Cluster, :url])
|
||||
|> URI.parse()
|
||||
|> Map.put(:path, "/healthz")
|
||||
|> URI.to_string()
|
||||
|
||||
[endpoint]
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue