FEATURE: apply a small penalty to closed topics when searching (#7782)

This commit is contained in:
Penar Musaraj
2019-06-20 22:03:45 -04:00
committed by Sam
parent 9a25b0d614
commit f51f37eddf
2 changed files with 25 additions and 1 deletions

View File

@@ -861,7 +861,11 @@ class Search
THEN #{SiteSetting.category_search_priority_high_weight}
WHEN #{Searchable::PRIORITIES[:very_high]}
THEN #{SiteSetting.category_search_priority_very_high_weight}
ELSE 1
ELSE
CASE WHEN topics.closed
THEN 0.9
ELSE 1
END
END
)
)