MikeThomsen commented on code in PR #6460:
URL: https://github.com/apache/nifi/pull/6460#discussion_r1002258991
##########
nifi-nar-bundles/nifi-mongodb-bundle/nifi-mongodb-processors/src/main/java/org/apache/nifi/processors/mongodb/gridfs/PutGridFS.java:
##########
@@ -212,9 +267,10 @@ private boolean canUploadFile(ProcessContext context,
FlowFile input, String buc
Document query;
if (uniqueness.equals(UNIQUE_BOTH.getValue())) {
- query = new Document().append("filename",
fileName).append("md5", hash);
+ query = new Document().append("filename", fileName)
+ .append("metadata", new Document(hashMetadataName,
hash));
} else if (uniqueness.equals(UNIQUE_HASH.getValue())) {
- query = new Document().append("md5", hash);
+ query = new Document().append("metadata", new
Document(hashMetadataName, hash));
Review Comment:
This might be worth a larger discussion on the dev mailing list as it
probably makes more sense to support the feature as a custom deduplication
query.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]