if doc[:upsert]
            d[:upsert] = true
          end
          d[Operation::COLLATION] = doc[:collation] if doc[:collation]
          d[Operation::ARRAY_FILTERS] = doc[:array_filters] if doc[:array_filters]