From: lain Date: Thu, 19 Nov 2020 12:20:58 +0000 (+0100) Subject: Activity search: Fix order of results X-Git-Url: https://git.squeep.com/?a=commitdiff_plain;h=3388bf9c9b4d200e7fca6c8bcc5edd79bfa3b73d;p=akkoma Activity search: Fix order of results Greatly speeds up the search for RUM. --- diff --git a/lib/pleroma/activity/search.ex b/lib/pleroma/activity/search.ex index ceb365bb3..95ac90acb 100644 --- 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