<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 02:53:06 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-125] Field Matcher: field negative matcher (exclusion)</title>
                <link>https://jira.mongodb.org/browse/SERVER-125</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;find( {} , &lt;/p&gt;
{ foo : -1 }
&lt;p&gt; )&lt;/p&gt;

&lt;p&gt;edit by mstearn:&lt;br/&gt;
final syntax:&lt;/p&gt;
{foo: 0}
&lt;p&gt; or &lt;/p&gt;
{foo: false}
{foo: -1}
&lt;p&gt; is treated as &lt;/p&gt;
{foo: true}</description>
                <environment></environment>
        <key id="10250">SERVER-125</key>
            <summary>Field Matcher: field negative matcher (exclusion)</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="mathias@mongodb.com">Mathias Stearn</assignee>
                                    <reporter username="eliot">Eliot Horowitz</reporter>
                        <labels>
                    </labels>
                <created>Sun, 5 Jul 2009 08:58:29 +0000</created>
                <updated>Tue, 12 Jul 2016 00:30:25 +0000</updated>
                            <resolved>Wed, 28 Oct 2009 13:06:58 +0000</resolved>
                                                    <fixVersion>1.1.3</fixVersion>
                                    <component>Querying</component>
                                        <votes>7</votes>
                                    <watches>6</watches>
                                                                                                                <comments>
                            <comment id="11000" author="redbeard0531" created="Wed, 28 Oct 2009 13:06:58 +0000"  >&lt;p&gt;This is working in master as long as you don&apos;t need both include and exclude on the same query. If you need that comment on &lt;a href=&quot;http://jira.mongodb.org/browse/SERVER-391&quot; class=&quot;external-link&quot; rel=&quot;nofollow&quot;&gt;http://jira.mongodb.org/browse/SERVER-391&lt;/a&gt; with the desired semantics.&lt;/p&gt;

&lt;p&gt;I went with a slightly different syntax than is suggested above. Rather than use -1 as the exclude value I used any &quot;false&quot; value. Currently that means false, null, and 0 of any numeric type. Anything else (including -1) is evaluated as true and means include. For sanity&apos;s sake, I suggest sticking to either true/false or 1/0.&lt;/p&gt;</comment>
                            <comment id="10432" author="eliot" created="Fri, 14 Aug 2009 16:24:40 +0000"  >&lt;p&gt;I think that should uassert (throw a user exception)&lt;/p&gt;</comment>
                            <comment id="10431" author="mikejs" created="Fri, 14 Aug 2009 16:11:32 +0000"  >&lt;p&gt;What would be the semantics of mixing inclusion and exclusion at the same level? E.g. what would happen with:&lt;/p&gt;

&lt;p&gt;&amp;gt; find({}, &lt;/p&gt;
{comments: 1, summary: -1}
&lt;p&gt;)&lt;/p&gt;

&lt;p&gt;Should that raise an error or should one of them take precedence?&lt;/p&gt;</comment>
                            <comment id="10429" author="eliot" created="Fri, 14 Aug 2009 15:36:47 +0000"  >&lt;p&gt;resolved wrong ticket&lt;/p&gt;</comment>
                            <comment id="10428" author="eliot" created="Fri, 14 Aug 2009 15:32:02 +0000"  >&lt;p&gt;thanks mike!&lt;/p&gt;</comment>
                            <comment id="10411" author="sandstrom" created="Wed, 12 Aug 2009 16:30:17 +0000"  >&lt;p&gt;I was about to create a ticket for this myself. &lt;/p&gt;

&lt;p&gt;This is very useful for when implementing a database mapper, and you&apos;d like to lazy-load certain fields. Would very much like to see support for this!&lt;/p&gt;</comment>
                            <comment id="10375" author="wouter" created="Sun, 9 Aug 2009 22:21:54 +0000"  >&lt;p&gt;I hope to see Sascha&apos;s suggestion implemented (support for negative matchers like &quot;comments.content: -1&quot; that refer to an array of embedded objects, and not to a single embedded object).&lt;/p&gt;</comment>
                            <comment id="10220" author="x6j8x" created="Sun, 5 Jul 2009 09:11:34 +0000"  >&lt;p&gt;I was just thinking if include/exclusion should work combined.&lt;/p&gt;

&lt;p&gt;Say I have a document which represents a blog entry with comments embedded. &lt;/p&gt;

&lt;p&gt;{ _id: ... title: ... , summary: ..., content: ... , comments: [  &lt;/p&gt;
{ name: ..., title: ..., content: .... }
&lt;p&gt;, &lt;/p&gt;
{ ... }
&lt;p&gt; ] } &lt;/p&gt;

&lt;p&gt;find( &lt;/p&gt;
{ _id: .... }
&lt;p&gt;, &lt;/p&gt;
{  comments: 1, comments.content: -1 }
&lt;p&gt; ) &lt;/p&gt;

&lt;p&gt;So I want to load all comments for a specific _id, but exclude the content field from each comment. &lt;/p&gt;

&lt;p&gt;Could something like this make sense?&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>8.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Sun, 5 Jul 2009 09:11:34 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        14 years, 17 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>false</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>
                            14 years, 17 weeks ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                    <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>eliot</customfieldvalue>
            <customfieldvalue>mathias@mongodb.com</customfieldvalue>
            <customfieldvalue>mikejs</customfieldvalue>
            <customfieldvalue>sandstrom</customfieldvalue>
            <customfieldvalue>x6j8x</customfieldvalue>
            <customfieldvalue>wouter</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hrpxqf:</customfieldvalue>

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

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10558" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>21289</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|hstv0v:</customfieldvalue>

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