<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 03:18: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-8904] The data type of a value is causing error: {  &quot;$err&quot; : &quot;requested keyPattern does not match specified keys&quot;,  &quot;code&quot; : 10365 }</title>
                <link>https://jira.mongodb.org/browse/SERVER-8904</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;&amp;gt; db.challenge_157_daily_scores.find().hint(&lt;br/&gt;
...         &lt;/p&gt;
{
...             g:1,
...             d:-1,
...             s:-1,
...             i:1,
...             t:1
...         }
&lt;p&gt;).sort(&lt;br/&gt;
...         &lt;/p&gt;
{
...             g:1,
...             d:-1,
...             s:-1,
...             i:1,
...             t:1
...         }
&lt;p&gt;)._addSpecial(&apos;$returnKey&apos;,true).min(&lt;br/&gt;
...         &lt;/p&gt;
{
...             g: 1,
...             d: ISODate(&quot;2013-03-07T00:00:00Z&quot;),
...             s: 2000,
...             i: 1,
...             t: &apos;u&apos;
...         }
&lt;p&gt;).max(&lt;br/&gt;
...         {&lt;br/&gt;
...             &quot;g&quot; : 1,&lt;br/&gt;
...             &quot;d&quot; : 1,&lt;br/&gt;
...             &quot;s&quot; : &lt;/p&gt;
{
...                 &quot;$minElement&quot; : 1
...             }
&lt;p&gt;,&lt;br/&gt;
...             &quot;i&quot; : &lt;/p&gt;
{
...                 &quot;$maxElement&quot; : 1
...             }
&lt;p&gt;,&lt;br/&gt;
...             &quot;t&quot; : &lt;/p&gt;
{
...                 &quot;$maxElement&quot; : 1
...             }
&lt;p&gt;...         }&lt;br/&gt;
...         );&lt;/p&gt;
{ &quot;g&quot; : 1, &quot;d&quot; : ISODate(&quot;2013-03-07T00:00:00Z&quot;), &quot;s&quot; : 1719, &quot;i&quot; : 24579031, &quot;t&quot; : &quot;u&quot; }
{ &quot;g&quot; : 1, &quot;d&quot; : ISODate(&quot;2013-03-07T00:00:00Z&quot;), &quot;s&quot; : 1472, &quot;i&quot; : 24579049, &quot;t&quot; : &quot;u&quot; }
{ &quot;g&quot; : 1, &quot;d&quot; : ISODate(&quot;2013-03-07T00:00:00Z&quot;), &quot;s&quot; : 1298, &quot;i&quot; : 24579022, &quot;t&quot; : &quot;u&quot; }
{ &quot;g&quot; : 1, &quot;d&quot; : ISODate(&quot;2013-03-07T00:00:00Z&quot;), &quot;s&quot; : 1228, &quot;i&quot; : 24579013, &quot;t&quot; : &quot;u&quot; }
{ &quot;g&quot; : 1, &quot;d&quot; : ISODate(&quot;2013-03-07T00:00:00Z&quot;), &quot;s&quot; : 1159, &quot;i&quot; : 24579033, &quot;t&quot; : &quot;u&quot; }
{ &quot;g&quot; : 1, &quot;d&quot; : ISODate(&quot;2013-03-07T00:00:00Z&quot;), &quot;s&quot; : 814, &quot;i&quot; : 24579045, &quot;t&quot; : &quot;u&quot; }
{ &quot;g&quot; : 1, &quot;d&quot; : ISODate(&quot;2013-03-07T00:00:00Z&quot;), &quot;s&quot; : 747, &quot;i&quot; : 24579014, &quot;t&quot; : &quot;u&quot; }
{ &quot;g&quot; : 1, &quot;d&quot; : ISODate(&quot;2013-03-07T00:00:00Z&quot;), &quot;s&quot; : 487, &quot;i&quot; : 24579032, &quot;t&quot; : &quot;u&quot; }
{ &quot;g&quot; : 1, &quot;d&quot; : ISODate(&quot;2013-03-07T00:00:00Z&quot;), &quot;s&quot; : 412, &quot;i&quot; : 24579038, &quot;t&quot; : &quot;u&quot; }
{ &quot;g&quot; : 1, &quot;d&quot; : ISODate(&quot;2013-03-07T00:00:00Z&quot;), &quot;s&quot; : 164, &quot;i&quot; : 24579019, &quot;t&quot; : &quot;u&quot; }
{ &quot;g&quot; : 1, &quot;d&quot; : ISODate(&quot;2013-03-06T00:00:00Z&quot;), &quot;s&quot; : 1555, &quot;i&quot; : 24579047, &quot;t&quot; : &quot;u&quot; }
{ &quot;g&quot; : 1, &quot;d&quot; : ISODate(&quot;2013-03-06T00:00:00Z&quot;), &quot;s&quot; : 1317, &quot;i&quot; : 24579029, &quot;t&quot; : &quot;u&quot; }
{ &quot;g&quot; : 1, &quot;d&quot; : ISODate(&quot;2013-03-05T00:00:00Z&quot;), &quot;s&quot; : 1998, &quot;i&quot; : 24579013, &quot;t&quot; : &quot;u&quot; }
{ &quot;g&quot; : 1, &quot;d&quot; : ISODate(&quot;2013-03-05T00:00:00Z&quot;), &quot;s&quot; : 1882, &quot;i&quot; : 24579008, &quot;t&quot; : &quot;u&quot; }
{ &quot;g&quot; : 1, &quot;d&quot; : ISODate(&quot;2013-03-05T00:00:00Z&quot;), &quot;s&quot; : 1654, &quot;i&quot; : 24579032, &quot;t&quot; : &quot;u&quot; }
{ &quot;g&quot; : 1, &quot;d&quot; : ISODate(&quot;2013-03-05T00:00:00Z&quot;), &quot;s&quot; : 1533, &quot;i&quot; : 24579036, &quot;t&quot; : &quot;u&quot; }
{ &quot;g&quot; : 1, &quot;d&quot; : ISODate(&quot;2013-03-05T00:00:00Z&quot;), &quot;s&quot; : 1333, &quot;i&quot; : 24579052, &quot;t&quot; : &quot;u&quot; }
{ &quot;g&quot; : 1, &quot;d&quot; : ISODate(&quot;2013-03-05T00:00:00Z&quot;), &quot;s&quot; : 1219, &quot;i&quot; : 24579019, &quot;t&quot; : &quot;u&quot; }
{ &quot;g&quot; : 1, &quot;d&quot; : ISODate(&quot;2013-03-05T00:00:00Z&quot;), &quot;s&quot; : 1047, &quot;i&quot; : 24579015, &quot;t&quot; : &quot;u&quot; }
{ &quot;g&quot; : 1, &quot;d&quot; : ISODate(&quot;2013-03-05T00:00:00Z&quot;), &quot;s&quot; : 782, &quot;i&quot; : 24579043, &quot;t&quot; : &quot;u&quot; }

&lt;p&gt;Looks good!&lt;/p&gt;



&lt;p&gt;&amp;gt; db.challenge_157_daily_scores.find().hint(&lt;br/&gt;
...         &lt;/p&gt;
{
...             g:1,
...             d:-1,
...             s:-1,
...             i:1,
...             t:1
...         }
&lt;p&gt;).sort(&lt;br/&gt;
...         &lt;/p&gt;
{
...             g:1,
...             d:-1,
...             s:-1,
...             i:1,
...             t:1
...         }
&lt;p&gt;)._addSpecial(&apos;$returnKey&apos;,true).min(&lt;br/&gt;
...         &lt;/p&gt;
{
...             g: 1,
...             d: ISODate(&quot;2013-03-07T00:00:00Z&quot;),
...             s: 2000,
...             i: 1,
...             t: &apos;u&apos;
...         }
&lt;p&gt;).max(&lt;br/&gt;
...         {&lt;br/&gt;
...             &quot;g&quot; : 1,&lt;br/&gt;
...             &quot;d&quot; : ISODate(&quot;2013-03-07T00:00:00Z&quot;),&lt;br/&gt;
...             &quot;s&quot; : &lt;/p&gt;
{
...                 &quot;$minElement&quot; : 1
...             }
&lt;p&gt;,&lt;br/&gt;
...             &quot;i&quot; : &lt;/p&gt;
{
...                 &quot;$maxElement&quot; : 1
...             }
&lt;p&gt;,&lt;br/&gt;
...             &quot;t&quot; : &lt;/p&gt;
{
...                 &quot;$maxElement&quot; : 1
...             }
&lt;p&gt;...         }&lt;br/&gt;
...         );&lt;br/&gt;
error: {&lt;br/&gt;
	&quot;$err&quot; : &quot;requested keyPattern does not match specified keys&quot;,&lt;br/&gt;
	&quot;code&quot; : 10365&lt;br/&gt;
}&lt;/p&gt;

&lt;p&gt;Changing d from an integer (1) to an ISODate shouldn&apos;t affect the keyPattern.&lt;/p&gt;</description>
                <environment></environment>
        <key id="67693">SERVER-8904</key>
            <summary>The data type of a value is causing error: {  &quot;$err&quot; : &quot;requested keyPattern does not match specified keys&quot;,  &quot;code&quot; : 10365 }</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="aaron">Aaron Staple</assignee>
                                    <reporter username="carl.youngblood">Carl Youngblood</reporter>
                        <labels>
                    </labels>
                <created>Thu, 7 Mar 2013 22:59:45 +0000</created>
                <updated>Tue, 19 Mar 2013 20:18:17 +0000</updated>
                            <resolved>Mon, 11 Mar 2013 18:39:46 +0000</resolved>
                                    <version>2.0.2</version>
                    <version>2.2.2</version>
                                                    <component>Querying</component>
                                        <votes>0</votes>
                                    <watches>3</watches>
                                                                                                                <comments>
                            <comment id="286522" author="carl.youngblood" created="Mon, 11 Mar 2013 18:46:38 +0000"  >&lt;p&gt;Thank you!&lt;/p&gt;</comment>
                            <comment id="286507" author="aaron" created="Mon, 11 Mar 2013 18:39:31 +0000"  >&lt;p&gt;Hi Carl - I&apos;m going to close this as &quot;works as designed&quot; but feel free to reopen if you have further questions.&lt;/p&gt;</comment>
                            <comment id="286505" author="aaron" created="Mon, 11 Mar 2013 18:38:50 +0000"  >&lt;p&gt;Hi Carl,&lt;/p&gt;

&lt;p&gt;The main thing to keep in mind here is that you cannot specify a max bound that compares less than your min bound.  Here are your min and max bounds in the different examples:&lt;/p&gt;

&lt;p&gt;1:&lt;br/&gt;
min &lt;/p&gt;
{g:1,d:ISODate(&apos;2013-01-01&apos;),s:700,i:0,t:0}
&lt;p&gt;max {g:1,d:ISODate(&apos;2013-01-01&apos;),s:{},i:1,t:1}&lt;/p&gt;

&lt;p&gt;In this case, &apos;g&apos; and &apos;d&apos; are equal.  The &apos;s&apos; field is an object in max and a number in min.  Objects generally compare greater than numbers, however in this case you have specified descending comparison on the &apos;s&apos; field so {} will be considered less than 700 and the min / max values are not allowed.&lt;/p&gt;

&lt;p&gt;2:&lt;br/&gt;
min &lt;/p&gt;
{g:1,d:ISODate(&apos;2013-01-01&apos;),s:700,i:0,t:0}
&lt;p&gt;max {g:1,d:ISODate(&apos;2013-01-01&apos;),s:1,i:{},t:1}&lt;/p&gt;

&lt;p&gt;In this case, 700 &amp;gt; 1 so compares &quot;less&quot; because of the descending order on the &apos;s&apos; field.&lt;/p&gt;

&lt;p&gt;3:&lt;br/&gt;
min &lt;/p&gt;
{g:1,d:ISODate(&apos;2013-01-01&apos;),s:700,i:0,t:0}
&lt;p&gt;max {g:1,d:1,s:{},i:1,t:1}&lt;/p&gt;

&lt;p&gt;Because there is an equality on &apos;g&apos;, ordering is based on the &apos;d&apos; field.  Generally a date compares greater than a number, but since you have a descending order on the &apos;d&apos; field min will be less than max so your min and max are allowed.&lt;/p&gt;</comment>
                            <comment id="285075" author="carl.youngblood" created="Sat, 9 Mar 2013 11:06:44 +0000"  >&lt;p&gt;My bad! Thank you for correcting my Min/MaxKey syntax. However, it does mean that my previous use of &lt;/p&gt;
{&apos;$minKey&apos;:1}
&lt;p&gt; was just a plain object, so there still seems to be inconsistent behavior.&lt;/p&gt;

&lt;p/&gt;
&lt;div id=&quot;syntaxplugin&quot; class=&quot;syntaxplugin&quot; style=&quot;border: 1px dashed #bbb; border-radius: 5px !important; overflow: auto; max-height: 30em;&quot;&gt;
&lt;table cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; border=&quot;0&quot; width=&quot;100%&quot; style=&quot;font-size: 1em; line-height: 1.4em !important; font-weight: normal; font-style: normal; color: black;&quot;&gt;
		&lt;tbody &gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;  margin-top: 10px;   width: auto; padding: 0;&quot;&gt;&amp;nbsp;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;// Query 1&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&amp;nbsp;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;&amp;gt; db.test.find().hint({g:1,d:-1,s:-1,i:1,t:1}).min({g:1,d:ISODate(&apos;2013-01-01&apos;),s:700,i:0,t:0}).max({g:1,d:ISODate(&apos;2013-01-01&apos;),s:{},i:1,t:1})&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;error: {&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;        &quot;$err&quot; : &quot;requested keyPattern does not match specified keys&quot;,&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;        &quot;code&quot; : 10365&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&amp;nbsp;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;// Query 2&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;//   Just moving the dictionary from the s key to the i key stops causing error 10365&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&amp;nbsp;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;&amp;gt; db.test.find().hint({g:1,d:-1,s:-1,i:1,t:1}).min({g:1,d:ISODate(&apos;2013-01-01&apos;),s:700,i:0,t:0}).max({g:1,d:ISODate(&apos;2013-01-01&apos;),s:1,i:{},t:1})&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;{ &quot;_id&quot; : ObjectId(&quot;5139406d0518ed58a08d64c0&quot;), &quot;g&quot; : [ 1 ], &quot;d&quot; : ISODate(&quot;2013-01-01T00:00:00Z&quot;), &quot;s&quot; : 700, &quot;i&quot; : 0, &quot;t&quot; : 0 }&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;{ &quot;_id&quot; : ObjectId(&quot;513940700518ed58a08d64c1&quot;), &quot;g&quot; : [ 1 ], &quot;d&quot; : ISODate(&quot;2013-01-01T00:00:00Z&quot;), &quot;s&quot; : 600, &quot;i&quot; : 0, &quot;t&quot; : 0 }&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;{ &quot;_id&quot; : ObjectId(&quot;513940740518ed58a08d64c2&quot;), &quot;g&quot; : [ 1 ], &quot;d&quot; : ISODate(&quot;2013-01-01T00:00:00Z&quot;), &quot;s&quot; : 500, &quot;i&quot; : 0, &quot;t&quot; : 0 }&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;{ &quot;_id&quot; : ObjectId(&quot;513941f60518ed58a08d64c9&quot;), &quot;g&quot; : [ 1, 2 ], &quot;d&quot; : ISODate(&quot;2013-01-01T00:00:00Z&quot;), &quot;s&quot; : 350, &quot;i&quot; : 0, &quot;t&quot; : 0 }&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&amp;nbsp;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;// Query 3&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;//    Just changing the data type of d from a Date to an Int stops causing error 10365&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&amp;nbsp;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;&amp;gt; db.test.find().hint({g:1,d:-1,s:-1,i:1,t:1}).min({g:1,d:ISODate(&apos;2013-01-01&apos;),s:700,i:0,t:0}).max({g:1,d:1,s:{},i:1,t:1})&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;{ &quot;_id&quot; : ObjectId(&quot;5139406d0518ed58a08d64c0&quot;), &quot;g&quot; : [ 1 ], &quot;d&quot; : ISODate(&quot;2013-01-01T00:00:00Z&quot;), &quot;s&quot; : 700, &quot;i&quot; : 0, &quot;t&quot; : 0 }&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;{ &quot;_id&quot; : ObjectId(&quot;513940700518ed58a08d64c1&quot;), &quot;g&quot; : [ 1 ], &quot;d&quot; : ISODate(&quot;2013-01-01T00:00:00Z&quot;), &quot;s&quot; : 600, &quot;i&quot; : 0, &quot;t&quot; : 0 }&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;{ &quot;_id&quot; : ObjectId(&quot;513940740518ed58a08d64c2&quot;), &quot;g&quot; : [ 1 ], &quot;d&quot; : ISODate(&quot;2013-01-01T00:00:00Z&quot;), &quot;s&quot; : 500, &quot;i&quot; : 0, &quot;t&quot; : 0 }&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;{ &quot;_id&quot; : ObjectId(&quot;513941f60518ed58a08d64c9&quot;), &quot;g&quot; : [ 1, 2 ], &quot;d&quot; : ISODate(&quot;2013-01-01T00:00:00Z&quot;), &quot;s&quot; : 350, &quot;i&quot; : 0, &quot;t&quot; : 0 }&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   margin-bottom: 10px;  width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
			&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;p/&gt;

&lt;p&gt;Thanks for all your help!&lt;/p&gt;</comment>
                            <comment id="284568" author="aaron" created="Fri, 8 Mar 2013 18:45:29 +0000"  >&lt;p&gt;Hi Carl - I don&apos;t think &lt;/p&gt;
{ $minElement:1 }
&lt;p&gt; and &lt;/p&gt;
{ $maxElement:1 }
&lt;p&gt; can be sent to the server in this form.  From the shell I think you can do:&lt;/p&gt;

&lt;p/&gt;
&lt;div id=&quot;syntaxplugin&quot; class=&quot;syntaxplugin&quot; style=&quot;border: 1px dashed #bbb; border-radius: 5px !important; overflow: auto; max-height: 30em;&quot;&gt;
&lt;table cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; border=&quot;0&quot; width=&quot;100%&quot; style=&quot;font-size: 1em; line-height: 1.4em !important; font-weight: normal; font-style: normal; color: black;&quot;&gt;
		&lt;tbody &gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;  margin-top: 10px;   margin-bottom: 10px;  width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;&amp;gt; db.test.find().hint({g:1,d:-1,s:-1,i:1,t:1}).min({g:1,d:new Date(&apos;2013-01-01&apos;),s:700,i:0,t:0}).max({g:1,d:new Date(&apos;2013-01-01&apos;),s:MinKey,i:MaxKey,t:MaxKey})&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
			&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;p/&gt;</comment>
                            <comment id="284339" author="carl.youngblood" created="Fri, 8 Mar 2013 15:22:07 +0000"  >&lt;p&gt;Here is a less messy copy and paste. Please note the only difference between query 1 and 2 is the change to the value of the d key in the max parameter.&lt;/p&gt;

&lt;p&gt;// Query 1&lt;br/&gt;
db.test.find().hint(&lt;/p&gt;
{g:1,d:-1,s:-1,i:1,t:1}
&lt;p&gt;).min(&lt;/p&gt;
{g:1,d:ISODate(&apos;2013-01-01&apos;),s:700,i:0,t:0}
&lt;p&gt;).max({g:1,d:ISODate(&apos;2013-01-01&apos;),s:&lt;/p&gt;
{&apos;$minElement&apos;:1}
&lt;p&gt;,i:&lt;/p&gt;
{&apos;$maxElement&apos;:1}
&lt;p&gt;,t:{&apos;$maxElement&apos;:1}})&lt;br/&gt;
error: {&lt;br/&gt;
        &quot;$err&quot; : &quot;requested keyPattern does not match specified keys&quot;,&lt;br/&gt;
        &quot;code&quot; : 10365&lt;br/&gt;
}&lt;/p&gt;

&lt;p&gt;// Query 2&lt;br/&gt;
db.test.find().hint(&lt;/p&gt;
{g:1,d:-1,s:-1,i:1,t:1}
&lt;p&gt;).min(&lt;/p&gt;
{g:1,d:ISODate(&apos;2013-01-01&apos;),s:700,i:0,t:0}
&lt;p&gt;).max({g:1,d:1,s:&lt;/p&gt;
{&apos;$minElement&apos;:1}
&lt;p&gt;,i:&lt;/p&gt;
{&apos;$maxElement&apos;:1}
&lt;p&gt;,t:{&apos;$maxElement&apos;:1}})&lt;/p&gt;
{ &quot;_id&quot; : ObjectId(&quot;5139406d0518ed58a08d64c0&quot;), &quot;g&quot; : [ 1 ], &quot;d&quot; : ISODate(&quot;2013-01-01T00:00:00Z&quot;), &quot;s&quot; : 700, &quot;i&quot; : 0, &quot;t&quot; : 0 }
{ &quot;_id&quot; : ObjectId(&quot;513940700518ed58a08d64c1&quot;), &quot;g&quot; : [ 1 ], &quot;d&quot; : ISODate(&quot;2013-01-01T00:00:00Z&quot;), &quot;s&quot; : 600, &quot;i&quot; : 0, &quot;t&quot; : 0 }
{ &quot;_id&quot; : ObjectId(&quot;513940740518ed58a08d64c2&quot;), &quot;g&quot; : [ 1 ], &quot;d&quot; : ISODate(&quot;2013-01-01T00:00:00Z&quot;), &quot;s&quot; : 500, &quot;i&quot; : 0, &quot;t&quot; : 0 }
{ &quot;_id&quot; : ObjectId(&quot;513941f60518ed58a08d64c9&quot;), &quot;g&quot; : [ 1, 2 ], &quot;d&quot; : ISODate(&quot;2013-01-01T00:00:00Z&quot;), &quot;s&quot; : 350, &quot;i&quot; : 0, &quot;t&quot; : 0 }</comment>
                            <comment id="283808" author="carl.youngblood" created="Thu, 7 Mar 2013 23:00:09 +0000"  >&lt;p&gt;The ellipses everywhere are just from copy pasting from my shell, if it really bugs you I can edit them out.&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>7.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Fri, 8 Mar 2013 18:45:29 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        10 years, 49 weeks, 2 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_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>ian@mongodb.com</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            10 years, 49 weeks, 2 days 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_10032" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                        <customfieldname>Operating System</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10026"><![CDATA[ALL]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>aaron</customfieldvalue>
            <customfieldvalue>carl.youngblood</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hrk5mn:</customfieldvalue>

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

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10558" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>45439</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_10750" key="com.atlassian.jira.plugin.system.customfieldtypes:textarea">
                        <customfieldname>Steps To Reproduce</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>&lt;p&gt;Please see description&lt;/p&gt;</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|ht03u7:</customfieldvalue>

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