aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlain <lain@soykaf.club>2020-11-19 13:20:58 +0100
committerlain <lain@soykaf.club>2020-11-19 13:20:58 +0100
commit5e2ba57327b88f7304ebbd9df73a15d892ee536c (patch)
treedb973c66d66b1068809676492520b3bfb4f4e54b
parent6f9b03384fe50ce063e8fee3103a69dff298107b (diff)
downloadpleroma-5e2ba57327b88f7304ebbd9df73a15d892ee536c.tar.gz
Activity search: Fix order of results
Greatly speeds up the search for RUM.
-rw-r--r--lib/pleroma/activity/search.ex5
1 files changed, 4 insertions, 1 deletions
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