mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FEATURE: show tags in search results
This commit is contained in:
@@ -84,6 +84,10 @@ class SearchIndexer
|
||||
update_index('category', category_id, name)
|
||||
end
|
||||
|
||||
def self.update_tags_index(tag_id, name)
|
||||
update_index('tag', tag_id, name)
|
||||
end
|
||||
|
||||
def self.index(obj, force: false)
|
||||
return if @disabled
|
||||
|
||||
@@ -115,6 +119,10 @@ class SearchIndexer
|
||||
if obj.class == Category && (obj.name_changed? || force)
|
||||
SearchIndexer.update_categories_index(obj.id, obj.name)
|
||||
end
|
||||
|
||||
if obj.class == Tag && (obj.name_changed? || force)
|
||||
SearchIndexer.update_tags_index(obj.id, obj.name)
|
||||
end
|
||||
end
|
||||
|
||||
class HtmlScrubber < Nokogiri::XML::SAX::Document
|
||||
|
||||
Reference in New Issue
Block a user