<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 07:55:03 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-7813] Sparse Index with Unique Constraint property not working as given in docs)</title>
                <link>https://jira.mongodb.org/browse/DOCS-7813</link>
                <project id="10380" key="DOCS">Documentation</project>
                    <description>&lt;p&gt;AS per given docs index with unique will insert a new document if i have the unique value same but as i found result is opposite that it is not allowing to insert &lt;/p&gt;

&lt;p&gt;E1100 duplicate error i am getting &lt;/p&gt;

&lt;p&gt;&lt;b&gt;Reporter&lt;/b&gt;: vishal &lt;br/&gt;
&lt;b&gt;E-mail&lt;/b&gt;: &lt;span class=&quot;nobr&quot;&gt;&lt;a href=&quot;mailto:aroravishal91@gmail.com&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;aroravishal91@gmail.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>we are using mactentossh for running mongo&lt;br/&gt;
&lt;br/&gt;
*Location*: &lt;a href=&quot;https://docs.mongodb.org/manual/core/index-sparse/&quot;&gt;https://docs.mongodb.org/manual/core/index-sparse/&lt;/a&gt;&lt;br/&gt;
*User-Agent*: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/50.0.2661.94 Safari/537.36&lt;br/&gt;
*Referrer*: &lt;a href=&quot;https://docs.mongodb.org/manual/core/index-partial/&quot;&gt;https://docs.mongodb.org/manual/core/index-partial/&lt;/a&gt;&lt;br/&gt;
*Screen Resolution*: 1280 x 1024&lt;br/&gt;
</environment>
        <key id="284618">DOCS-7813</key>
            <summary>Sparse Index with Unique Constraint property not working as given in docs)</summary>
                <type id="1" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14703&amp;avatarType=issuetype">Bug</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="-1">Unassigned</assignee>
                                    <reporter username="aroravishal91@gmail.com">vishal arora</reporter>
                        <labels>
                            <label>collector-298ba4e7</label>
                    </labels>
                <created>Thu, 5 May 2016 09:32:27 +0000</created>
                <updated>Fri, 3 Nov 2017 11:13:58 +0000</updated>
                            <resolved>Wed, 18 May 2016 03:34:14 +0000</resolved>
                                                    <fixVersion>01112017-cleanup</fixVersion>
                                        <due></due>
                            <votes>0</votes>
                                    <watches>2</watches>
                                                                                                                <comments>
                            <comment id="1267238" author="kay.kim@10gen.com" created="Wed, 18 May 2016 03:34:14 +0000"  >&lt;p&gt;Hi &amp;#8211; thanks for filing this ticket.  On the page, we state that (bolded here just to better highlight)&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;An index that is both sparse and unique *&lt;b&gt;prevents&lt;/b&gt;* collection from having documents with duplicate values for a field but allows multiple documents that *&lt;b&gt;omit&lt;/b&gt;* the key.&lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;So, a unique, sparse index will not allow for duplicate keys; however, if the documents are missing the key, then it will allow the insert.&lt;/p&gt;

&lt;p&gt;So, if unique, sparse index on field &lt;b&gt;x&lt;/b&gt; exists, you can insert into some collection collA:&lt;/p&gt;
{ x: 1 } 
{ y: 0 } 
{ y: 0 }
{ y: 1 } 
&lt;p&gt;but not&lt;/p&gt;
{ x: 1}
&lt;p&gt; again.&lt;/p&gt;

&lt;p&gt;If the &lt;b&gt;x&lt;/b&gt; index were only unique and not sparse, you could insert into some other collection collB:&lt;/p&gt;
{ x: 1} 
{ y: 0 }
&lt;p&gt;  &amp;lt;-- the &lt;b&gt;x&lt;/b&gt; value would be null.&lt;br/&gt;
but not:&lt;/p&gt;
{ y: 0 }
&lt;p&gt; or &lt;/p&gt;
{ y: 1 }
&lt;p&gt; since these would both have an &lt;b&gt;x&lt;/b&gt; value of null and conflict with the already inserted &lt;/p&gt;
{ y: 0 }
&lt;p&gt; document.&lt;/p&gt;

&lt;p&gt;Hope this helps.&lt;/p&gt;

&lt;p&gt;Regards,&lt;/p&gt;

&lt;p&gt;Kay &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>1.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Wed, 18 May 2016 03:34:14 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        7 years, 39 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>
                            7 years, 39 weeks, 1 day ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                            <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>kay.kim@mongodb.com</customfieldvalue>
            <customfieldvalue>aroravishal91@gmail.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hrmsyv:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hsl4hj:</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_14350" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>serverRank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hrz6vr:</customfieldvalue>

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