<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 02:54:16 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-484] Sparse Indexes (WAS: Add an &quot;ignore missing&quot; option to indexes)</title>
                <link>https://jira.mongodb.org/browse/SERVER-484</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;The proposal is for another index option to be added that marks an index as not including any documents with missing index values in the index. For composite indexes this would ignore any documents where all the index values are missing. I would suggest if the index values are present but set to null they probably should be included in the index.&lt;/p&gt;

&lt;p&gt;This would save considerable space and time when inserting into polymorphic collections where an index is only designed to affect a subset of the collection.&lt;/p&gt;

&lt;p&gt;This would provide a large benefit to unique indexes, allowing a unique index to be created where only a percentage of the records in a collection are eligible to participate in the index. Currently it is not apparantly possible to add a unique index to a polymorphic collection where many records do not have the field to be indexed.&lt;/p&gt;</description>
                <environment>All</environment>
        <key id="10998">SERVER-484</key>
            <summary>Sparse Indexes (WAS: Add an &quot;ignore missing&quot; option to indexes)</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="eliot">Eliot Horowitz</assignee>
                                    <reporter username="keithbranton">Keith Branton</reporter>
                        <labels>
                    </labels>
                <created>Mon, 14 Dec 2009 10:53:42 +0000</created>
                <updated>Tue, 12 Jul 2016 00:30:22 +0000</updated>
                            <resolved>Sun, 21 Nov 2010 04:24:31 +0000</resolved>
                                                    <fixVersion>1.7.4</fixVersion>
                                    <component>Index Maintenance</component>
                                        <votes>25</votes>
                                    <watches>18</watches>
                                                                                                                <comments>
                            <comment id="21176" author="scotthernandez" created="Wed, 8 Dec 2010 17:56:07 +0000"  >&lt;p&gt;Currently this only supports a single field. See &lt;a href=&quot;http://jira.mongodb.org/browse/SERVER-2193&quot; class=&quot;external-link&quot; rel=&quot;nofollow&quot;&gt;http://jira.mongodb.org/browse/SERVER-2193&lt;/a&gt; for compound index support.&lt;/p&gt;</comment>
                            <comment id="20540" author="auto" created="Sun, 21 Nov 2010 04:24:27 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;login&apos;: &apos;erh&apos;, &apos;name&apos;: &apos;Eliot Horowitz&apos;, &apos;email&apos;: &apos;eliot@10gen.com&apos;}
&lt;p&gt;Message: more tests for sparse indexes &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-484&quot; title=&quot;Sparse Indexes (WAS: Add an &amp;quot;ignore missing&amp;quot; option to indexes)&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-484&quot;&gt;&lt;del&gt;SERVER-484&lt;/del&gt;&lt;/a&gt;&lt;br/&gt;
/mongodb/mongo/commit/e869a8e02c1209536edd3af6856084ddd2101274&lt;/p&gt;</comment>
                            <comment id="20539" author="auto" created="Sun, 21 Nov 2010 04:24:25 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;login&apos;: &apos;erh&apos;, &apos;name&apos;: &apos;Eliot Horowitz&apos;, &apos;email&apos;: &apos;eliot@10gen.com&apos;}
&lt;p&gt;Message: basic sparse indexes working &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-484&quot; title=&quot;Sparse Indexes (WAS: Add an &amp;quot;ignore missing&amp;quot; option to indexes)&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-484&quot;&gt;&lt;del&gt;SERVER-484&lt;/del&gt;&lt;/a&gt;&lt;br/&gt;
/mongodb/mongo/commit/e55fa7eb47873abe3236b3e1686d2a337dd6a86a&lt;/p&gt;</comment>
                            <comment id="19819" author="remonvv" created="Fri, 29 Oct 2010 13:01:58 +0000"  >&lt;p&gt;Voted on this. Mongo lends itself very well for user profile data and such but this issue blocks that for lazy registration and the like. Any eta on this?&lt;/p&gt;</comment>
                            <comment id="13104" author="scotthernandez" created="Thu, 18 Mar 2010 17:22:00 +0000"  >&lt;p&gt;I have added another issue for Partial Indexes: &lt;a href=&quot;http://jira.mongodb.org/browse/SERVER-785&quot; class=&quot;external-link&quot; rel=&quot;nofollow&quot;&gt;http://jira.mongodb.org/browse/SERVER-785&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I think it would be able to take care of most of what this issue needs. The only challenging part would be to create a partial index that excludes &quot;missing&quot; value, as well as Nulls.&lt;/p&gt;</comment>
                            <comment id="13101" author="davidtildon" created="Thu, 18 Mar 2010 15:15:48 +0000"  >&lt;p&gt;I&apos;d like to see this expanded to match Postgres&apos; concept of partial indexes: &lt;a href=&quot;http://www.postgresql.org/docs/8.3/static/indexes-partial.html&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://www.postgresql.org/docs/8.3/static/indexes-partial.html&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;That way for the case above you could just create a unique index on &apos;email&apos; where email is not nil. No need for a distinct &quot;ignore missing&quot; option.&lt;/p&gt;

&lt;p&gt;In my own program I need to routinely delete old accounts where the user never finished registering, so I could create an index on &apos;created_at&apos; where &apos;registration_finalized&apos; is false.&lt;/p&gt;

&lt;p&gt;And so on and so forth.&lt;/p&gt;</comment>
                            <comment id="11620" author="chrishanks" created="Tue, 5 Jan 2010 16:24:59 +0000"  >&lt;p&gt;This would be really, really useful. One of my use cases:&lt;/p&gt;

&lt;p&gt;For login purposes, I index users based on their email address, which I would expect to be unique. However, I practice lazy registration, and let my users use the app for a while without officially registering and providing their email address - for those users, the email field is simply nil, so I currently can&apos;t use a unique index on this field.&lt;/p&gt;</comment>
                            <comment id="11428" author="eliot" created="Fri, 18 Dec 2009 20:41:44 +0000"  >&lt;p&gt;Sorry to say that comment was wrong and is now removed.&lt;br/&gt;
I do think we can do this though&lt;/p&gt;</comment>
                            <comment id="11427" author="keithbranton" created="Fri, 18 Dec 2009 18:43:57 +0000"  >&lt;p&gt;Reading more of the documentation I now believe this is actually a bug, and that there&apos;s no need for a new option if index behavior is corrected to match the documentation, which states:&lt;/p&gt;

&lt;p&gt;&quot;When indexing, documents which do not have the specified field are not included in the index.&quot;&lt;/p&gt;

&lt;p&gt;on this page:&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://www.mongodb.org/display/DOCS/Indexes&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://www.mongodb.org/display/DOCS/Indexes&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Based on that statement I believe I should be able to create a collection, add a unique index, and then insert two documents that do not have the indexed field on them successfully. What happens is I get a duplicate key errorindex complaining about a dup key value of null. I suspect, therefore, that documents that do not have the specified field are, in fact, included in the index.&lt;/p&gt;

&lt;p&gt;Please explain if I&apos;ve misunderstood. (And please, please don&apos;t change the documentation to match the behavior &lt;img class=&quot;emoticon&quot; src=&quot;https://jira.mongodb.org/images/icons/emoticons/smile.png&quot; height=&quot;16&quot; width=&quot;16&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt;&lt;/p&gt;</comment>
                            <comment id="11361" author="eliot" created="Mon, 14 Dec 2009 10:56:28 +0000"  >&lt;p&gt;this would make behavior different based on indexes, which is generally something that is considered bad.&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_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Mon, 14 Dec 2009 10:56:28 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        13 years, 11 weeks 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>ramon.fernandez@mongodb.com</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            13 years, 11 weeks ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                        <customfield id="customfield_10000" key="com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons">
                        <customfieldname>Old_Backport</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10000"><![CDATA[No]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>auto</customfieldvalue>
            <customfieldvalue>chrishanks</customfieldvalue>
            <customfieldvalue>davidtildon</customfieldvalue>
            <customfieldvalue>eliot</customfieldvalue>
            <customfieldvalue>keithbranton</customfieldvalue>
            <customfieldvalue>remonvv</customfieldvalue>
            <customfieldvalue>scotthernandez</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hrptof:</customfieldvalue>

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

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10558" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>22285</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                            <customfield id="customfield_23361" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Requested By</customfieldname>
                        <customfieldvalues>
                                

                        </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|ht0hwn:</customfieldvalue>

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