<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 07:39:18 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>[DOCS-694] problem about creating unqiue index with &quot;dropDups&quot; option</title>
                <link>https://jira.mongodb.org/browse/DOCS-694</link>
                <project id="10380" key="DOCS">Documentation</project>
                    <description>&lt;p&gt;db.people.insert([&lt;/p&gt;
{ &quot;_id&quot; : ObjectId(&quot;508f639c086512dc1f8694bd&quot;), &quot;username&quot; : &quot;smith&quot;, &quot;age&quot; : 48, &quot;user_id&quot; : 0 }
&lt;p&gt;   ,&lt;/p&gt;
{ &quot;_id&quot; : ObjectId(&quot;508f63a1086512dc1f8694be&quot;), &quot;username&quot; : &quot;smith&quot;, &quot;age&quot; : 30, &quot;user_id&quot; : 1 }
&lt;p&gt;   ,&lt;/p&gt;
{ &quot;_id&quot; : ObjectId(&quot;508f63ae086512dc1f8694bf&quot;), &quot;username&quot; : &quot;john&quot;, &quot;age&quot; : 36, &quot;user_id&quot; : 2 }
&lt;p&gt;    ,&lt;/p&gt;
{ &quot;_id&quot; : ObjectId(&quot;508f63b9086512dc1f8694c0&quot;), &quot;username&quot; : &quot;john&quot;, &quot;age&quot; : 18, &quot;user_id&quot; : 3 }
&lt;p&gt;    ,&lt;/p&gt;
{ &quot;_id&quot; : ObjectId(&quot;508f63ca086512dc1f8694c1&quot;), &quot;username&quot; : &quot;joe&quot;, &quot;age&quot; : 36, &quot;user_id&quot; : 4 }
&lt;p&gt;     ,&lt;/p&gt;
{ &quot;_id&quot; : ObjectId(&quot;508f63d5086512dc1f8694c2&quot;), &quot;username&quot; : &quot;john&quot;, &quot;age&quot; : 7, &quot;user_id&quot; : 5 }
&lt;p&gt;     ,&lt;/p&gt;
{ &quot;_id&quot; : ObjectId(&quot;508f63e0086512dc1f8694c3&quot;), &quot;username&quot; : &quot;simon&quot;, &quot;age&quot; : 3, &quot;user_id&quot; : 6 }
&lt;p&gt;    ,&lt;/p&gt;
{ &quot;_id&quot; : ObjectId(&quot;508f63ee086512dc1f8694c4&quot;), &quot;username&quot; : &quot;joe&quot;, &quot;age&quot; : 27, &quot;user_id&quot; : 7 }
&lt;p&gt;     ,&lt;/p&gt;
{ &quot;_id&quot; : ObjectId(&quot;508f63f9086512dc1f8694c5&quot;), &quot;username&quot; : &quot;jacob&quot;, &quot;age&quot; : 17, &quot;user_id&quot; : 8 }
&lt;p&gt;   ,&lt;/p&gt;
{ &quot;_id&quot; : ObjectId(&quot;508f6404086512dc1f8694c6&quot;), &quot;username&quot; : &quot;sally&quot;, &quot;age&quot; : 52, &quot;user_id&quot; : 9 }
&lt;p&gt;   ,&lt;/p&gt;
{ &quot;_id&quot; : ObjectId(&quot;508f640d086512dc1f8694c7&quot;), &quot;username&quot; : &quot;simon&quot;, &quot;age&quot; : 59, &quot;user_id&quot; : 10 }
&lt;p&gt;  ])&lt;/p&gt;


&lt;p&gt;db.people.ensureIndex(&lt;/p&gt;
{&quot;age&quot;: 1}
&lt;p&gt;, &lt;/p&gt;
{&quot;dropDups&quot;: true}
&lt;p&gt;)                   # step 1&lt;br/&gt;
db.people.ensureIndex(&lt;/p&gt;
{&quot;age&quot;: 1}
&lt;p&gt;, &lt;/p&gt;
{&quot;unique&quot;: true, &quot;dropDups&quot;: true}
&lt;p&gt;)   # step 2&lt;/p&gt;


&lt;p&gt;The step 2 doesn&apos;t take effect after I run step 1...&lt;/p&gt;

&lt;p&gt;&lt;b&gt;Reporter&lt;/b&gt;: Ryououki&lt;br/&gt;
&lt;b&gt;E-mail&lt;/b&gt;: &lt;span class=&quot;nobr&quot;&gt;&lt;a href=&quot;mailto:ytao_s@hotmail.com&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;ytao_s@hotmail.com&lt;sup&gt;&lt;img class=&quot;rendericon&quot; src=&quot;https://jira.mongodb.org/images/icons/mail_small.gif&quot; height=&quot;12&quot; width=&quot;13&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt;&lt;/sup&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;</description>
                <environment>Mongodb: 2.2.0&lt;br/&gt;
Linux: 2.6.32-279.9.1.el6.x86_64 (CentOS)&lt;br/&gt;
&lt;br/&gt;
*Location*: &lt;a href=&quot;http://cn.docs.mongodb.org/manual/&quot;&gt;http://cn.docs.mongodb.org/manual/&lt;/a&gt;&lt;br/&gt;
*User-Agent*: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.4 (KHTML, like Gecko) Chrome/22.0.1229.94 Safari/537.4&lt;br/&gt;
*Referrer*: &lt;a href=&quot;http://cn.docs.mongodb.org/manual/reference/method/&quot;&gt;http://cn.docs.mongodb.org/manual/reference/method/&lt;/a&gt;&lt;br/&gt;
*Screen Resolution*: 1440 x 900&lt;br/&gt;
</environment>
        <key id="54737">DOCS-694</key>
            <summary>problem about creating unqiue index with &quot;dropDups&quot; option</summary>
                <type id="4" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14710&amp;avatarType=issuetype">Improvement</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="9">Done</resolution>
                                        <assignee username="sam.kleinman">Sam Kleinman</assignee>
                                    <reporter username="auto">auto</reporter>
                        <labels>
                            <label>collector-298ba4e7</label>
                    </labels>
                <created>Tue, 30 Oct 2012 08:23:56 +0000</created>
                <updated>Fri, 3 Nov 2017 11:23:32 +0000</updated>
                            <resolved>Tue, 6 Nov 2012 18:24:33 +0000</resolved>
                                                                        <due></due>
                            <votes>0</votes>
                                    <watches>2</watches>
                                                                                                                <comments>
                            <comment id="183143" author="auto" created="Tue, 6 Nov 2012 18:25:12 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;date&apos;: u&apos;2012-11-06T18:24:13Z&apos;, u&apos;email&apos;: u&apos;samk@10gen.com&apos;, u&apos;name&apos;: u&apos;Sam Kleinman&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/DOCS-694&quot; title=&quot;problem about creating unqiue index with &amp;quot;dropDups&amp;quot; option&quot; class=&quot;issue-link&quot; data-issue-key=&quot;DOCS-694&quot;&gt;&lt;del&gt;DOCS-694&lt;/del&gt;&lt;/a&gt; adding note about ensure index behavior&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/docs/commit/07d11ea8a577aced24a5e3e991495a331f93ff76&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/docs/commit/07d11ea8a577aced24a5e3e991495a331f93ff76&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="180526" author="samk" created="Tue, 30 Oct 2012 13:38:55 +0000"  >&lt;p&gt;That&apos;s correct.&lt;/p&gt;

&lt;p&gt;The ensureIndex will not rebuild an index if that index already exists with that field. In this situation, you would need to drop the index and recreate it with the desired options. On a related note, as a general rule, it&apos;s a good idea to &lt;b&gt;not&lt;/b&gt; call the ensureIndex option as part of application startup in production systems: at best it&apos;s a no-op, and at worst a typo or change in configuration can render a production system inaccessible while it builds an unnecessary index. &lt;/p&gt;

&lt;p&gt;I&apos;ll make a change to the docs soon that will underscore both of these aspects of the ensureIndex command.&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>2.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Tue, 30 Oct 2012 13:38:55 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        11 years, 15 weeks, 1 day 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_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>jess.mokrzecki@mongodb.com</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            11 years, 15 weeks, 1 day ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                            <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>auto</customfieldvalue>
            <customfieldvalue>sam.kleinman</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hrs8in:</customfieldvalue>

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

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10558" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>32128</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_14350" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>serverRank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hryivb:</customfieldvalue>

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