mirror of
https://akkoma.dev/AkkomaGang/akkoma.git
synced 2024-11-13 12:44:51 +00:00
extra cool
This commit is contained in:
parent
bed6f4e12c
commit
7f30218b82
2 changed files with 6 additions and 4 deletions
|
@ -120,7 +120,7 @@ defmodule Pleroma.Elasticsearch do
|
|||
)
|
||||
end
|
||||
|
||||
def bulk_post(data, :hashtags) do
|
||||
def bulk_post([] = data, :hashtags) do
|
||||
d =
|
||||
data
|
||||
|> Enum.map(fn d ->
|
||||
|
@ -139,6 +139,8 @@ defmodule Pleroma.Elasticsearch do
|
|||
)
|
||||
end
|
||||
|
||||
def bulk_post(_, :hashtags), do: {:ok, nil}
|
||||
|
||||
def search(:raw, index, type, q) do
|
||||
with {:ok, raw_results} <- Elastix.Search.search(url(), index, [type], q) do
|
||||
results =
|
||||
|
|
|
@ -7,7 +7,7 @@ defmodule Pleroma.Search.Elasticsearch do
|
|||
alias Pleroma.Search.Elasticsearch.Parsers
|
||||
alias Pleroma.Web.Endpoint
|
||||
|
||||
defp es_query(:activity, query) do
|
||||
def es_query(:activity, query) do
|
||||
%{
|
||||
size: 50,
|
||||
terminate_after: 50,
|
||||
|
@ -23,7 +23,7 @@ defmodule Pleroma.Search.Elasticsearch do
|
|||
}
|
||||
end
|
||||
|
||||
defp es_query(:user, query) do
|
||||
def es_query(:user, query) do
|
||||
%{
|
||||
size: 50,
|
||||
terminate_after: 50,
|
||||
|
@ -36,7 +36,7 @@ defmodule Pleroma.Search.Elasticsearch do
|
|||
}
|
||||
end
|
||||
|
||||
defp es_query(:hashtag, query) do
|
||||
def es_query(:hashtag, query) do
|
||||
%{
|
||||
size: 50,
|
||||
terminate_after: 50,
|
||||
|
|
Loading…
Reference in a new issue