Commit 3997ce5
authored
FIX: sort by topic activity when searching in:title (#36630)
When using `in:title` (or `t`), search results were sorted by the first
post's creation date instead of the topic's last activity. This caused
topics with recent replies to appear lower than older topics with no
activity, which was unintuitive.
For example, a topic created 5 years ago with a reply yesterday would
appear below a topic created last week with no replies, even though the
user expects "Latest Post" to show recently active topics first.
Now when `@in_title` is true, we sort by `topics.bumped_at` instead of
`posts.created_at`, matching user expectations for topic-level searches.
Internal ref - t/1706421 parent 536acef commit 3997ce5
2 files changed
+33
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
844 | 844 | | |
845 | 845 | | |
846 | 846 | | |
847 | | - | |
| 847 | + | |
| 848 | + | |
| 849 | + | |
848 | 850 | | |
849 | 851 | | |
850 | 852 | | |
851 | 853 | | |
852 | 854 | | |
853 | | - | |
| 855 | + | |
| 856 | + | |
| 857 | + | |
854 | 858 | | |
855 | 859 | | |
856 | 860 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2841 | 2841 | | |
2842 | 2842 | | |
2843 | 2843 | | |
| 2844 | + | |
| 2845 | + | |
| 2846 | + | |
| 2847 | + | |
| 2848 | + | |
| 2849 | + | |
| 2850 | + | |
| 2851 | + | |
| 2852 | + | |
| 2853 | + | |
| 2854 | + | |
| 2855 | + | |
| 2856 | + | |
| 2857 | + | |
| 2858 | + | |
| 2859 | + | |
| 2860 | + | |
| 2861 | + | |
| 2862 | + | |
| 2863 | + | |
| 2864 | + | |
| 2865 | + | |
| 2866 | + | |
| 2867 | + | |
| 2868 | + | |
| 2869 | + | |
| 2870 | + | |
2844 | 2871 | | |
2845 | 2872 | | |
2846 | 2873 | | |
| |||
0 commit comments