<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 03:27:52 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-12193] Forbid queries with a $meta project and a non-$meta sort on same field</title>
                <link>https://jira.mongodb.org/browse/SERVER-12193</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;Forbid queries such as:&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;db.collection.find({$text:{$search:&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;&quot;hello&quot;&lt;/span&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;}},{s:{$meta:&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;&quot;textScore&quot;&lt;/span&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;}}).sort({s:-1})&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;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;This will help users figure out more quickly that they have to use sort({s:{$meta:&quot;textScore&quot;}}), not sort({s:-1}).&lt;/li&gt;
	&lt;li&gt;There is no support currently for these queries on a sharded collection (current behavior: mongod will sort on the value of the field in the document, but mongos will merge sort on the projected score field).&lt;/li&gt;
	&lt;li&gt;The analogous aggregation pipeline will in fact work as intended &amp;#8211; by design, it can &quot;correctly&quot; sort on the computed field &quot;s&quot;.  Forbidding these queries in the query engine will avoid defining conflicting behavior for the two query systems.&lt;/li&gt;
&lt;/ul&gt;
</description>
                <environment></environment>
        <key id="103621">SERVER-12193</key>
            <summary>Forbid queries with a $meta project and a non-$meta sort on same field</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="rassi">J Rassi</assignee>
                                    <reporter username="rassi">J Rassi</reporter>
                        <labels>
                    </labels>
                <created>Mon, 23 Dec 2013 20:23:03 +0000</created>
                <updated>Fri, 7 Feb 2014 23:10:40 +0000</updated>
                            <resolved>Tue, 21 Jan 2014 07:14:29 +0000</resolved>
                                    <version>2.5.4</version>
                                    <fixVersion>2.5.5</fixVersion>
                                    <component>Querying</component>
                    <component>Text Search</component>
                                        <votes>0</votes>
                                    <watches>2</watches>
                                                                                                                <comments>
                            <comment id="484709" author="xgen-internal-githook" created="Tue, 21 Jan 2014 07:13:25 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;username&apos;: u&apos;jrassi&apos;, u&apos;name&apos;: u&apos;Jason Rassi&apos;, u&apos;email&apos;: u&apos;rassi@10gen.com&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-12038&quot; title=&quot;Forbid $meta sort on field that does not have $meta project&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-12038&quot;&gt;&lt;del&gt;SERVER-12038&lt;/del&gt;&lt;/a&gt; &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-12193&quot; title=&quot;Forbid queries with a $meta project and a non-$meta sort on same field&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-12193&quot;&gt;&lt;del&gt;SERVER-12193&lt;/del&gt;&lt;/a&gt; LiteParsedQuery validate queries with $meta&lt;/p&gt;

&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;Reject queries that have a normal sort and $meta projection on the&lt;br/&gt;
  same field.&lt;/li&gt;
	&lt;li&gt;Reject queries that have a $meta sort on a field but no $meta&lt;br/&gt;
  projection on that field.&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/4d96802d9699a36aa32f954e223f6da1aa47f8b1&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/4d96802d9699a36aa32f954e223f6da1aa47f8b1&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
</comment>
                            <comment id="481537" author="xgen-internal-githook" created="Tue, 14 Jan 2014 04:18:38 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;username&apos;: u&apos;jrassi&apos;, u&apos;name&apos;: u&apos;Jason Rassi&apos;, u&apos;email&apos;: u&apos;rassi@10gen.com&apos;}
&lt;p&gt;Message: Revert &quot;&lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-12038&quot; title=&quot;Forbid $meta sort on field that does not have $meta project&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-12038&quot;&gt;&lt;del&gt;SERVER-12038&lt;/del&gt;&lt;/a&gt; &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-12193&quot; title=&quot;Forbid queries with a $meta project and a non-$meta sort on same field&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-12193&quot;&gt;&lt;del&gt;SERVER-12193&lt;/del&gt;&lt;/a&gt; LiteParsedQuery validate queries with $meta&quot;&lt;/p&gt;

&lt;p&gt;This reverts commit 192f4bcd1b9a91cad4f184ad7cd3679b56cb9f5f.&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/9154de8aea7424d0b26b92d1b09d0164caee7c66&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/9154de8aea7424d0b26b92d1b09d0164caee7c66&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="481405" author="xgen-internal-githook" created="Mon, 13 Jan 2014 23:46:08 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;username&apos;: u&apos;jrassi&apos;, u&apos;name&apos;: u&apos;Jason Rassi&apos;, u&apos;email&apos;: u&apos;rassi@10gen.com&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-12038&quot; title=&quot;Forbid $meta sort on field that does not have $meta project&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-12038&quot;&gt;&lt;del&gt;SERVER-12038&lt;/del&gt;&lt;/a&gt; &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-12193&quot; title=&quot;Forbid queries with a $meta project and a non-$meta sort on same field&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-12193&quot;&gt;&lt;del&gt;SERVER-12193&lt;/del&gt;&lt;/a&gt; PlanCacheTest should use $meta properly&lt;/p&gt;

&lt;p&gt;It is no longer valid to use a $meta sort without a $meta projection.&lt;br/&gt;
Update PlanCacheTest suite accordingly.&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/4f9c0008b9c046690d9d84579ccd98b8553412ab&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/4f9c0008b9c046690d9d84579ccd98b8553412ab&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="481312" author="xgen-internal-githook" created="Mon, 13 Jan 2014 22:16:37 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;username&apos;: u&apos;jrassi&apos;, u&apos;name&apos;: u&apos;Jason Rassi&apos;, u&apos;email&apos;: u&apos;rassi@10gen.com&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-12038&quot; title=&quot;Forbid $meta sort on field that does not have $meta project&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-12038&quot;&gt;&lt;del&gt;SERVER-12038&lt;/del&gt;&lt;/a&gt; &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-12193&quot; title=&quot;Forbid queries with a $meta project and a non-$meta sort on same field&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-12193&quot;&gt;&lt;del&gt;SERVER-12193&lt;/del&gt;&lt;/a&gt; LiteParsedQuery validate queries with $meta&lt;/p&gt;

&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;Reject queries that have a normal sort and $meta projection on the&lt;br/&gt;
  same field.&lt;/li&gt;
	&lt;li&gt;Reject queries that have a $meta sort on a field but no $meta&lt;br/&gt;
  projection on that field.&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/192f4bcd1b9a91cad4f184ad7cd3679b56cb9f5f&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/192f4bcd1b9a91cad4f184ad7cd3679b56cb9f5f&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
</comment>
                    </comments>
                    <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                <customfield id="customfield_10050" key="com.atlassian.jira.toolkit:comments">
                        <customfieldname># Replies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>4.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Mon, 13 Jan 2014 22:16:37 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        10 years, 4 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>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, 4 weeks, 1 day 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>xgen-internal-githook</customfieldvalue>
            <customfieldvalue>rassi</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hrm4x3:</customfieldvalue>

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

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

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