FIX: search couldn't find tags from before 2017-08-25
This commit is contained in:
parent
5f47a4807b
commit
2c15e9c6fe
|
@ -0,0 +1,9 @@
|
||||||
|
module Jobs
|
||||||
|
class CreateTagsSearchIndex < Jobs::Onceoff
|
||||||
|
def execute_onceoff(args)
|
||||||
|
Tag.exec_sql('select id, name from tags').each do |t|
|
||||||
|
SearchIndexer.update_tags_index(t['id'], t['name'])
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
|
@ -42,6 +42,15 @@ def reindex_search(db = RailsMultisite::ConnectionManagement.current_db)
|
||||||
id = c["id"]
|
id = c["id"]
|
||||||
name = c["name"]
|
name = c["name"]
|
||||||
SearchIndexer.update_categories_index(id, name)
|
SearchIndexer.update_categories_index(id, name)
|
||||||
|
|
||||||
|
putc '.'
|
||||||
|
end
|
||||||
|
|
||||||
|
puts '', 'Tags'
|
||||||
|
|
||||||
|
Tag.exec_sql('select id, name from tags').each do |t|
|
||||||
|
SearchIndexer.update_tags_index(t['id'], t['name'])
|
||||||
|
putc '.'
|
||||||
end
|
end
|
||||||
|
|
||||||
puts
|
puts
|
||||||
|
|
Loading…
Reference in New Issue