public DocumentUpdate addFieldUpdate(FieldUpdate update) {
        int fieldId = update.getField().getId();
        if (documentType.getField(fieldId) == null) {
            throw new IllegalArgumentException("Document type '" + documentType.getName() + "' does not have field '" + update.getField().getName() + "'.");
        }
        FieldUpdate prevUpdate = getFieldUpdateById(fieldId);
        if (prevUpdate != update) {
            if (prevUpdate != null) {
                prevUpdate.addAll(update);
            } else {
                id2FieldUpdates.put(fieldId, update);
            }
        }
        return this;
    }
Adds the given {@link FieldUpdate} to this DocumentUpdate. If this DocumentUpdate already contains a FieldUpdate
for the named field, the content of the given FieldUpdate is added to the existing one.

@param update The FieldUpdate to add to this DocumentUpdate.
@return This, to allow chaining.
@throws IllegalArgumentException If the {@link DocumentType} of this DocumentUpdate does not have a corresponding
                                 field.
document/src/main/java/com/yahoo/document/DocumentUpdate.java