logo

pleroma

My custom branche(s) on git.pleroma.social/pleroma/pleroma git clone https://hacktivis.me/git/pleroma.git
commit: 3388bf9c9b4d200e7fca6c8bcc5edd79bfa3b73d
parent 42a386eb9f3655b695de8d07e4d03e790655ccb0
Author: lain <lain@soykaf.club>
Date:   Thu, 19 Nov 2020 13:20:58 +0100

Activity search: Fix order of results

Greatly speeds up the search for RUM.

Diffstat:

Mlib/pleroma/activity/search.ex5++++-
1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/lib/pleroma/activity/search.ex b/lib/pleroma/activity/search.ex @@ -27,7 +27,10 @@ defmodule Pleroma.Activity.Search do |> maybe_restrict_local(user) |> maybe_restrict_author(author) |> maybe_restrict_blocked(user) - |> Pagination.fetch_paginated(%{"offset" => offset, "limit" => limit}, :offset) + |> Pagination.fetch_paginated( + %{"offset" => offset, "limit" => limit, "skip_order" => true}, + :offset + ) |> maybe_fetch(user, search_query) end