<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 04:02:47 UTC 2024

It is possible to restrict the fields that are returned in this document by specifying the 'field' parameter in your request.
For example, to request only the issue key and summary append 'field=key&field=summary' to the URL of your request.
-->
<rss version="0.92" >
<channel>
    <title>MongoDB Jira</title>
    <link>https://jira.mongodb.org</link>
    <description>This file is an XML representation of an issue</description>
    <language>en-us</language>    <build-info>
        <version>9.7.1</version>
        <build-number>970001</build-number>
        <build-date>13-04-2023</build-date>
    </build-info>


<item>
            <title>[SERVER-23239] $move operator for moving a value somewhere else in the same document</title>
                <link>https://jira.mongodb.org/browse/SERVER-23239</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;Three cases:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;Move and overwrite: say moving property &apos;a.b.c&apos; to &apos;x.y.z&apos;&lt;/li&gt;
	&lt;li&gt;Multiple move, last overwrite: say moving property a to b, property b to c, property c to d overwriting d&lt;/li&gt;
	&lt;li&gt;Move to insert in array: say moving property x to &apos;a.3&apos;, shifting up all current elements from 3 onward. If the value being moved to is from an array, shift down that array.&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;Currently all of these cases can require potentially large amounts of data to be passed back and forth, when the server really has all that information already.&lt;/p&gt;</description>
                <environment></environment>
        <key id="273682">SERVER-23239</key>
            <summary>$move operator for moving a value somewhere else in the same document</summary>
                <type id="2" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14711&amp;avatarType=issuetype">New Feature</type>
                                            <priority id="3" iconUrl="https://jira.mongodb.org/images/icons/priorities/major.svg">Major - P3</priority>
                        <status id="6" iconUrl="https://jira.mongodb.org/images/icons/statuses/closed.png" description="The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.">Closed</status>
                    <statusCategory id="3" key="done" colorName="success"/>
                                    <resolution id="12300">Won&apos;t Do</resolution>
                                        <assignee username="backlog-server-query">Backlog - Query Team</assignee>
                                    <reporter username="fresheneesz">Billy Tetrud</reporter>
                        <labels>
                    </labels>
                <created>Fri, 18 Mar 2016 22:34:18 +0000</created>
                <updated>Tue, 6 Dec 2022 04:30:32 +0000</updated>
                            <resolved>Sat, 29 Jun 2019 08:13:42 +0000</resolved>
                                                                    <component>Write Ops</component>
                                        <votes>1</votes>
                                    <watches>12</watches>
                                                                                                                <comments>
                            <comment id="2345865" author="charlie.swanson" created="Fri, 26 Jul 2019 16:55:22 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=HappyNomad&quot; class=&quot;user-hover&quot; rel=&quot;HappyNomad&quot;&gt;HappyNomad&lt;/a&gt; I responded on your StackOverflow post.&lt;/p&gt;</comment>
                            <comment id="2345075" author="JIRAUSER1258097" created="Fri, 26 Jul 2019 08:29:37 +0000"  >&lt;p&gt;How could one use 4.2&apos;s aggregation expressions to specify an update that moves a nested object between arrays?&#160; I asked this question &lt;a href=&quot;https://stackoverflow.com/q/57211928&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;here&lt;/a&gt; and &lt;a href=&quot;https://groups.google.com/d/msg/mongodb-user/HdfZ_B0f1gw/8qw6WjRmEAAJ&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;here&lt;/a&gt;.  I could use an example that specifically demonstrates this.&lt;/p&gt;</comment>
                            <comment id="2305658" author="asya" created="Sat, 29 Jun 2019 08:13:42 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-40381&quot; title=&quot;Add the ability to specify a pipeline to an update command&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-40381&quot;&gt;&lt;del&gt;SERVER-40381&lt;/del&gt;&lt;/a&gt; implemented support for aggregation expressions to specify update for 4.2.&#160;&lt;/p&gt;

&lt;p&gt;You can see some examples &lt;a href=&quot;https://docs.mongodb.com/master/reference/command/update/index.html#update-command-example-agg&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;here.&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This can be done using aggregation expressions.&lt;/p&gt;</comment>
                            <comment id="1210411" author="fresheneesz" created="Mon, 21 Mar 2016 23:24:35 +0000"  >&lt;p&gt;Ah, yes. Well I think both are important. Looking at the $rename docs, I believe &quot;replace the element currently at a.3 with x&quot; can already be done with $rename. The former, &quot;move x to a.3 shifting all elements from a.3 onward up by one index&quot; can&apos;t currently be done with any existing command. That&apos;s the one I&apos;m primarily interested in.&lt;/p&gt;</comment>
                            <comment id="1210379" author="schwerin" created="Mon, 21 Mar 2016 22:35:09 +0000"  >&lt;p&gt;Sorry, my point wasn&apos;t that your suggestion was invalid. Rather, that there are two things you might mean by &quot;move x to a.3&quot;. One is to insert at position a.3, shifting elements up as needed. The other is &quot;replace the element currently at a.3 with x&quot;. Presumably if one is valuable, both are. I&apos;m just trying to get a sense of the scope of the issue.&lt;/p&gt;</comment>
                            <comment id="1210373" author="fresheneesz" created="Mon, 21 Mar 2016 22:30:02 +0000"  >&lt;p&gt;Why would it? I don&apos;t understand the question. Sometimes you need to move things within an array, and I can also see cases where you want to move things between arrays within a document. There&apos;s no command I know of that allows mongo to do this without transferring all the data back and forth over the wire, so the real question is: why wouldn&apos;t there be a way to do that?&lt;/p&gt;</comment>
                            <comment id="1210369" author="schwerin" created="Mon, 21 Mar 2016 22:27:04 +0000"  >&lt;p&gt;Interesting. It would need a little more definition. Why, for example, would a move into a specific array position act like a vector insert and not just overwrite the value currently at the location?&lt;/p&gt;</comment>
                            <comment id="1210234" author="fresheneesz" created="Mon, 21 Mar 2016 20:58:46 +0000"  >&lt;p&gt;Hmm, looks like case 1 can be done with $rename. Case 2 could be done without transferring data by querying for whether various fields $exists, but use a projection that doesn&apos;t return that data, then do multiple $rename commands. Complicated, but it works.&lt;/p&gt;

&lt;p&gt;It looks like case 3 can&apos;t be done with $rename. I propose in that case, that either $rename gets an option somehow that can move items within a list in a way that shifts the appropriate elements, or that a new operator (like $move) be created specifically for that purpose.&lt;/p&gt;</comment>
                            <comment id="1209508" author="schwerin" created="Mon, 21 Mar 2016 14:12:41 +0000"  >&lt;p&gt;Can you achieve what you&apos;re looking for with the &lt;a href=&quot;https://docs.mongodb.org/manual/reference/operator/update/rename/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;$rename&lt;/a&gt; update operator, &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=fresheneesz&quot; class=&quot;user-hover&quot; rel=&quot;fresheneesz&quot;&gt;fresheneesz&lt;/a&gt;?&lt;/p&gt;</comment>
                            <comment id="1208586" author="fresheneesz" created="Fri, 18 Mar 2016 22:41:04 +0000"  >&lt;p&gt;What I meant by the stuff about &quot;potentially large amounts of data&quot; is that without a $move operator, you have to pass potentially large amounts of data to set a field, and in the case of multiple move, first save potentially large amounts of data so you can then move it elsewhere.&lt;/p&gt;</comment>
                    </comments>
                    <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                <customfield id="customfield_10050" key="com.atlassian.jira.toolkit:comments">
                        <customfieldname># Replies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>10.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                <customfield id="customfield_12751" key="com.atlassian.jira.plugin.system.customfieldtypes:multiselect">
                        <customfieldname>Assigned Teams</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="25143"><![CDATA[Query]]></customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Mon, 21 Mar 2016 14:12:41 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        4 years, 28 weeks, 5 days ago
    
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_18254" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Dependencies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue><![CDATA[]]></customfieldvalue>


                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_15850" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                            <customfield id="customfield_10857" key="com.pyxis.greenhopper.jira:gh-epic-link">
                        <customfieldname>Epic Link</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>PM-1021</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <customfield id="customfield_10057" key="com.atlassian.jira.toolkit:lastusercommented">
                        <customfieldname>Last comment by Customer</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>true</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                            <customfield id="customfield_10056" key="com.atlassian.jira.toolkit:lastupdaterorcommenter">
                        <customfieldname>Last commenter</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>alexander.golin@mongodb.com</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            4 years, 28 weeks, 5 days ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                    <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>happynomad121@gmail.com</customfieldvalue>
            <customfieldvalue>schwerin@mongodb.com</customfieldvalue>
            <customfieldvalue>asya.kamsky@mongodb.com</customfieldvalue>
            <customfieldvalue>backlog-server-query</customfieldvalue>
            <customfieldvalue>fresheneesz</customfieldvalue>
            <customfieldvalue>charlie.swanson@mongodb.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hrkd47:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hr7473:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10558" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>9223372036854775807</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        <customfield id="customfield_10053" key="com.atlassian.jira.ext.charting:timeinstatus">
                        <customfieldname>Time In Status</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        <customfield id="customfield_22870" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Triagers</customfieldname>
                        <customfieldvalues>
                                

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_14350" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>serverRank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hsf4nr:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                    </customfields>
    </item>
</channel>
</rss>