How to design n-to-n MongoDB database

for example, if there is a relationship between an article and a tag, an article (page) has multiple tags (tag), and a tag (tag) can be shared by multiple article (page)

< H2 > get the page list, hope to get the corresponding tag, then get the tag list, and then want to get the page corresponding to each tag < / H2 >.

if you design as follows, if you get the page list and then get the tag information for each page, do you want to traverse the page array, then traverse the page tag array and query the corresponding tag information?
get the tag list, traverse the tag list, and then traverse the page array of each tag to get the corresponding page?.
this seems too cumbersome. = and when saving each page, not only save to the page table, but also update the corresponding tag table.

page: 
_id: ""
tag: []

tag: 
_id: ""
page: []
Mar.13,2021

page and tag and tagPageMap

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b2b08b-2ba7b.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b2b08b-2ba7b.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?