1
0
Fork 0
forked from mirrors/akkoma

add timeouts

This commit is contained in:
FloatingGhost 2021-12-14 14:33:34 +00:00
parent 94c22baaa3
commit 0d7bbee430

View file

@ -9,9 +9,9 @@ defmodule Pleroma.Search.Elasticsearch do
defp es_query(:activity, query) do
%{
size: 500,
terminate_after: 500,
timeout: "10s",
size: 50,
terminate_after: 50,
timeout: "5s",
sort: [
%{"_timestamp" => "desc"}
],
@ -27,10 +27,7 @@ defp es_query(:user, query) do
%{
size: 50,
terminate_after: 50,
timeout: "10s",
sort: [
%{"_timestamp" => "desc"}
],
timeout: "5s",
query: %{
bool: %{
must: Parsers.User.parse(query)
@ -43,7 +40,7 @@ defp es_query(:hashtag, query) do
%{
size: 50,
terminate_after: 50,
timeout: "10s",
timeout: "5s",
query: %{
bool: %{
must: Parsers.Hashtag.parse(query)