You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by "Mike Thomsen (JIRA)" <ji...@apache.org> on 2017/11/25 01:31:01 UTC

[jira] [Commented] (NIFI-2135) PutMongo replacing document instead of updating document

    [ https://issues.apache.org/jira/browse/NIFI-2135?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16265573#comment-16265573 ] 

Mike Thomsen commented on NIFI-2135:
------------------------------------

I think this ticket can be closed because of #4588

> PutMongo replacing document instead of updating document
> --------------------------------------------------------
>
>                 Key: NIFI-2135
>                 URL: https://issues.apache.org/jira/browse/NIFI-2135
>             Project: Apache NiFi
>          Issue Type: Bug
>    Affects Versions: 0.6.1
>            Reporter: Bryan Bende
>            Priority: Minor
>         Attachments: 0001-NIFI-2135-PutMongo-will-now-update-using-a-set-and-r.patch, 0002-Verified-insert-update-and-replace.-Fixed-a-minor-lo.patch, nifi-mongodb-nar-0.7.0.nar
>
>
> How can I use put mongo processor to add a new key value pair to an existing document? The flow file contains the document object Id. I have set 'mode' property to 'update' and 'upsert' property to false and 'update query key' property to '_id'. Flow file content is something like this.
> {
> _id:ObjectId(577216f0154b943fe8068079)
> expired:true
> }
> Without inserting the 'expired:true', it replaces the whole document with the given one. So is there  a way to  insert the new key value pair to collection without replacing the whole collection in MongoDB using putmongo processor? 



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)