mirror of
https://github.com/discourse/discourse.git
synced 2025-09-06 10:50:21 +08:00
Add backend code for searching posts with images.
This commit is contained in:
parent
8f7d81fde6
commit
76712da166
2 changed files with 7 additions and 2 deletions
|
@ -338,6 +338,10 @@ class Search
|
|||
end
|
||||
end
|
||||
|
||||
advanced_filter(/in:image/) do |posts|
|
||||
posts.where("posts.image_url IS NOT NULL")
|
||||
end
|
||||
|
||||
advanced_filter(/category:(.+)/) do |posts,match|
|
||||
exact = false
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue