From 8e8747c564ce3f06a96fc031cd0da9297d631fe0 Mon Sep 17 00:00:00 2001 From: jsgoldstein Date: Fri, 25 Aug 2023 12:16:08 -0400 Subject: [PATCH] Update ordering to use `id` from body of document instead of deprecated `_id` (#26659) --- app/services/statuses_search_service.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/services/statuses_search_service.rb b/app/services/statuses_search_service.rb index 2a4e533cf..0d0de2a9d 100644 --- a/app/services/statuses_search_service.rb +++ b/app/services/statuses_search_service.rb @@ -27,7 +27,7 @@ class StatusesSearchService < BaseService ) ) - results = definition.collapse(field: :id).order(_id: { order: :desc }).limit(@limit).offset(@offset).objects.compact + results = definition.collapse(field: :id).order(id: { order: :desc }).limit(@limit).offset(@offset).objects.compact account_ids = results.map(&:account_id) account_domains = results.map(&:account_domain) preloaded_relations = @account.relations_map(account_ids, account_domains)