Bulk update unique values

Hi everyone!

We need to update a batch of documents in Java:

  • update existing fields and additional fields are all unique values (so can’t use filtering to cast a wide net, and update all matching docs the same way)
  • don’t want to update if the document doesn’t already exist

How to do this with update() or updateMany()?