projects
/
akkoma
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f039c9c
)
Sort by updated_at
author
Roger Braun
<roger@rogerbraun.net>
Sat, 16 Sep 2017 12:51:55 +0000
(14:51 +0200)
committer
Roger Braun
<roger@rogerbraun.net>
Sat, 16 Sep 2017 12:51:55 +0000
(14:51 +0200)
the updated_at column isn't indexed, so postgres won't take the wrong index.
lib/pleroma/web/twitter_api/twitter_api.ex
patch
|
blob
|
history
diff --git
a/lib/pleroma/web/twitter_api/twitter_api.ex
b/lib/pleroma/web/twitter_api/twitter_api.ex
index c1a3c887c7a6d4502a8520cece9a3a440126c3de..69287b9fb775cc6561ed8d18da712941915cf769 100644
(file)
--- a/
lib/pleroma/web/twitter_api/twitter_api.ex
+++ b/
lib/pleroma/web/twitter_api/twitter_api.ex
@@
-212,7
+212,8
@@
defmodule Pleroma.Web.TwitterAPI.TwitterAPI do
where: fragment("?->>'type' = 'Create'", a.data),
where: fragment("to_tsvector('english', ?->'object'->>'content') @@ plainto_tsquery('english', ?)", a.data, ^query),
limit: ^limit,
- offset: ^offset
+ offset: ^offset,
+ order_by: [desc: :updated_at] # this one isn't indexed so psql won't take the wrong index.
activities = Repo.all(q)
activities_to_statuses(activities, %{for: user})