Does MongoDB skip index updates if a field is set to its current value?

@Franck_Pachot1 Thanks for the reply.

  1. What if the write query is more complex and dynamic, involving $map, $mergeObjects, and $switch?

  2. Also, what if the write query replaces an entire embedded document with another document?

Is MongoDB also able to detect when the indexed values have not changed and skip those writes?