search: fix order:note, order:comment_bumped to use indexes.

This commit is contained in:
evazion
2017-05-19 18:19:05 -05:00
parent d74eda2b96
commit fad4d48b1c
4 changed files with 17 additions and 4 deletions
+1 -1
View File
@@ -419,7 +419,7 @@ class PostQueryBuilder
relation = relation.order("posts.last_comment_bumped_at DESC NULLS LAST")
when "comment_bumped_asc"
relation = relation.order("posts.last_comment_bumped_at ASC NULLS LAST")
relation = relation.order("posts.last_comment_bumped_at ASC NULLS FIRST")
when "note"
relation = relation.order("posts.last_noted_at DESC NULLS LAST")