How to move all topics of 1 category to new tag

Thank you! i moved subcategory come back parent category success.
I wanna insert and update all topics have a keyword to a tag, i know a little console but not effect, can you fix console same:

Topic.where(“quận 1 dt”).update_all(tags=“quận-1”)

rake posts:update_tag[“quận 1 dt”,“quận-1”]

I wanna do this action by consale, because my discourse have thousand topic to replace. What console to do this feature? Thank you!

Sorry so much! Im not a developer and don’t follow rails console professional, i will try study more. Thank you so much!