i have 2 collections productContent and skills. productContent has relationship attribute with skills collections, it store skills => [list of skills id's] (this was working fine, it was adding the skills id's from skills collection). skills collection also have relationship attribute with productContent collections, it should store productContent => [list of project id's], its not storing the unique technology, technology are getting repeated in the collections. As you suggested to include Index with unique type, I did that, now if the project is having any existing skills/technology, it neither adding in productContent collection nor in skills collection. I just want to do, in productContent collection should have relationship attribute with skills collection and will store skills id (skills=>[skillId1, skillId2...] and skills collection should have relationship attribute with productContent collection and store product id (productContent => [productid1, productId 2...]