Github user zenfenan commented on a diff in the pull request:
https://github.com/apache/nifi/pull/2560#discussion_r175820396
--- Diff:
nifi-nar-bundles/nifi-mongodb-bundle/nifi-mongodb-processors/src/main/java/org/apache/nifi/processors/mongodb/PutMongo.java
---
@@ -196,6 +237,33 @@ public void onTrigger(final ProcessContext context,
final ProcessSession session
}
}
+ private void removeUpdateKeys(String updateKeyParam, Map doc) {
+ String[] parts = updateKeyParam.split(",[\\s]*");
+ for (String part : parts) {
+ if (part.contains(".")) {
--- End diff --
No.. what I meant was, regardless of whether we have a complex key or
simple key, we don't need them to exist in the parsed filter query, right? So
why don't we simply remove this `if (part.contains("."))` check, basically
meaning, remove the key from the `doc`. No?
---