mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FEATURE: Add min_post_count search filter
This commit is contained in:
@@ -252,6 +252,10 @@ class Search
|
||||
posts.where("topics.posts_count = ?", match.to_i)
|
||||
end
|
||||
|
||||
advanced_filter(/min_post_count:(\d+)/) do |posts, match|
|
||||
posts.where("topics.posts_count >= ?", match.to_i)
|
||||
end
|
||||
|
||||
advanced_filter(/in:first/) do |posts|
|
||||
posts.where("posts.post_number = 1")
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user