@Override
    public int compareTo(FieldValue fieldValue) {
        int comp = super.compareTo(fieldValue);

        if (comp != 0) {
            return comp;
        }

        //types are equal, this must be of this type
        Document otherValue = (Document) fieldValue;
        comp = getId().compareTo(otherValue.getId());

        if (comp != 0) {
            return comp;
        }

        comp = content.compareTo(otherValue.content);

        if (comp != 0) {
            return comp;
        }

        return comp;
    }
Sets the last modified time of this Document. This is typically set by the library that retrieves the
Document from persistent storage, and should not be set by arbitrary clients. NOTE: This is a
transient field, and will not be serialized with a Document (will be null after deserialization).

@param lastModified the last modified time of this Document (in milliseconds)
document/src/main/java/com/yahoo/document/Document.java