Hello @Caleb_Mucheru

Can you please review your code:

  • are you writing to the collection you want to?
  • it looks as if there is an index on ‘book’
  • also it seems that the duplication is on a ‘null’ value → please verify if you codes does what you want

In case you can not fix the issue by checking the above points, please provide more details.

Best, Michael