private Set<Field> getAllUniqueFields() {
        Map<String, Field> map = new LinkedHashMap<>();
        for (Field field : getFields()) { // Uniqify on field name
            map.put(field.getName(), field);
        }
        return ImmutableSet.copyOf(map.values());
    }
All fields defined in the document and its parents
This is for internal use
Use {@link #fieldSet()} instead or {@link #fieldSetAll()} if you really want all fields
@return All fields defined in the document and its parents
document/src/main/java/com/yahoo/document/DocumentType.java