feature/elasticsearch #1

Merged
floatingghost merged 41 commits from feature/elasticsearch into develop 2021-12-12 17:37:28 +00:00
Showing only changes of commit fc96e359a4 - Show all commits

View file

@ -9,6 +9,12 @@ defmodule Pleroma.Search.Elasticsearch do
defp es_query(:activity, query) do
%{
size: 50,
terminate_after: 50,
timeout: "5s",
sort: [
%{"_timestamp" => "desc"}
],
query: %{
bool: %{
must: Parsers.Activity.parse(query)
@ -19,6 +25,9 @@ defp es_query(:activity, query) do
defp es_query(:user, query) do
%{
size: 50,
terminate_after: 50,
timeout: "5s",
query: %{
bool: %{
must: Parsers.User.parse(query)
@ -29,6 +38,9 @@ defp es_query(:user, query) do
defp es_query(:hashtag, query) do
%{
size: 50,
terminate_after: 50,
timeout: "5s",
query: %{
bool: %{
must: Parsers.Hashtag.parse(query)