Activity search: Fix order of results
authorlain <lain@soykaf.club>
Thu, 19 Nov 2020 12:20:58 +0000 (13:20 +0100)
committerlain <lain@soykaf.club>
Thu, 19 Nov 2020 12:20:58 +0000 (13:20 +0100)
Greatly speeds up the search for RUM.

lib/pleroma/activity/search.ex

index ceb365bb3c8b26096a53e42b6637418996a95df8..95ac90acbe4d1b2a1948215caea747db40996d11 100644 (file)
@@ -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