diff --git a/app/models/concerns/indexable.rb b/app/models/concerns/indexable.rb index eadb1b2b3..d1ddc9583 100644 --- a/app/models/concerns/indexable.rb +++ b/app/models/concerns/indexable.rb @@ -108,6 +108,10 @@ def query(query, options={}) from = 0 search_after = [options.dig(:page, :cursor)] sort = [{ _id: { order: 'asc' }}] + elsif self.name == "Activity" && options.dig(:page, :cursor).present? + from = 0 + search_after = [options.dig(:page, :cursor)] + sort = [{ created: { order: 'asc' }}] else from = (options.dig(:page, :number) - 1) * options.dig(:page, :size) search_after = nil