From 5e2ba57327b88f7304ebbd9df73a15d892ee536c Mon Sep 17 00:00:00 2001 From: lain Date: Thu, 19 Nov 2020 13:20:58 +0100 Subject: [PATCH 1/4] Activity search: Fix order of results Greatly speeds up the search for RUM. --- lib/pleroma/activity/search.ex | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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 From 2ee0fc194a3118e2b562744cb2854d048c829b1e Mon Sep 17 00:00:00 2001 From: lain Date: Thu, 19 Nov 2020 13:23:58 +0100 Subject: [PATCH 2/4] Changelog: Add info about search fixes. --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8658d5440..f5c12b6de 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -34,6 +34,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ### Fixed +- Search: RUM index search speed has been fixed. +
API Changes - Mastodon API: Current user is now included in conversation if it's the only participant. From 8b90d625060ddaa2f04fbc276ee39b532c7082b6 Mon Sep 17 00:00:00 2001 From: lain Date: Thu, 19 Nov 2020 16:29:31 +0100 Subject: [PATCH 3/4] Search: Only skip ordering the rum index. --- lib/pleroma/activity/search.ex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/pleroma/activity/search.ex b/lib/pleroma/activity/search.ex index 95ac90acb..382c81118 100644 --- a/lib/pleroma/activity/search.ex +++ b/lib/pleroma/activity/search.ex @@ -28,7 +28,7 @@ defmodule Pleroma.Activity.Search do |> maybe_restrict_author(author) |> maybe_restrict_blocked(user) |> Pagination.fetch_paginated( - %{"offset" => offset, "limit" => limit, "skip_order" => true}, + %{"offset" => offset, "limit" => limit, "skip_order" => index_type == :rum}, :offset ) |> maybe_fetch(user, search_query) From 1eda5ab267524aa953d093a6764d6194d4d6894e Mon Sep 17 00:00:00 2001 From: rinpatch Date: Thu, 19 Nov 2020 19:13:19 +0300 Subject: [PATCH 4/4] CHANGELOG.md: Move rum fix entry to patch section Also includes minor cosmetical fixes. --- CHANGELOG.md | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f5c12b6de..6e0bec996 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -34,13 +34,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ### Fixed -- Search: RUM index search speed has been fixed. - -
+-
API Changes -- Mastodon API: Current user is now included in conversation if it's the only participant. -- Mastodon API: Fixed last_status.account being not filled with account data. - + - Mastodon API: Current user is now included in conversation if it's the only participant. + - Mastodon API: Fixed last_status.account being not filled with account data.
## Unreleased (Patch) @@ -52,8 +49,9 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ### Fixed - Config generation: rename `Pleroma.Upload.Filter.ExifTool` to `Pleroma.Upload.Filter.Exiftool`. +- Search: RUM index search speed has been fixed. - S3 Uploads with Elixir 1.11. -- Fixed Emoji Reaction activity filtering from blocked and muted accounts +- Emoji Reaction activity filtering from blocked and muted accounts. - Mix task pleroma.user delete_activities for source installations. ## [2.2.0] - 2020-11-12