class UniqueTransform extends DocumentTransform.DefaultDocumentTransform {

    @Nullable
    @Override
    public Entry<Key,Document> apply(@Nullable Entry<Key,Document> keyDocumentEntry) {
        if (keyDocumentEntry != null) {
            try {
                if (isDuplicate(keyDocumentEntry.getValue())) {
                    keyDocumentEntry = null;
                }
            } catch (IOException ioe) {
                log.error("Failed to convert document to bytes.  Returning document as unique.", ioe);
            }
        }
        return keyDocumentEntry;
    }

    public  UniqueTransform(Set<String> fields);
    public  UniqueTransform(BaseQueryLogic<Entry<Key,Value>> logic, Set<String> fields);

}