forked from AkkomaGang/akkoma
add timeouts
This commit is contained in:
parent
94c22baaa3
commit
0d7bbee430
1 changed files with 5 additions and 8 deletions
|
@ -9,9 +9,9 @@ defmodule Pleroma.Search.Elasticsearch do
|
||||||
|
|
||||||
defp es_query(:activity, query) do
|
defp es_query(:activity, query) do
|
||||||
%{
|
%{
|
||||||
size: 500,
|
size: 50,
|
||||||
terminate_after: 500,
|
terminate_after: 50,
|
||||||
timeout: "10s",
|
timeout: "5s",
|
||||||
sort: [
|
sort: [
|
||||||
%{"_timestamp" => "desc"}
|
%{"_timestamp" => "desc"}
|
||||||
],
|
],
|
||||||
|
@ -27,10 +27,7 @@ defp es_query(:user, query) do
|
||||||
%{
|
%{
|
||||||
size: 50,
|
size: 50,
|
||||||
terminate_after: 50,
|
terminate_after: 50,
|
||||||
timeout: "10s",
|
timeout: "5s",
|
||||||
sort: [
|
|
||||||
%{"_timestamp" => "desc"}
|
|
||||||
],
|
|
||||||
query: %{
|
query: %{
|
||||||
bool: %{
|
bool: %{
|
||||||
must: Parsers.User.parse(query)
|
must: Parsers.User.parse(query)
|
||||||
|
@ -43,7 +40,7 @@ defp es_query(:hashtag, query) do
|
||||||
%{
|
%{
|
||||||
size: 50,
|
size: 50,
|
||||||
terminate_after: 50,
|
terminate_after: 50,
|
||||||
timeout: "10s",
|
timeout: "5s",
|
||||||
query: %{
|
query: %{
|
||||||
bool: %{
|
bool: %{
|
||||||
must: Parsers.Hashtag.parse(query)
|
must: Parsers.Hashtag.parse(query)
|
||||||
|
|
Loading…
Reference in a new issue