<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 03:02:35 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-3269] Inconsistent results using $regex and sort() </title>
                <link>https://jira.mongodb.org/browse/SERVER-3269</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;Using sort() on a $regex query seems to inconsistently break the $regex query:&lt;/p&gt;

&lt;p&gt;Without sort:&lt;br/&gt;
&amp;gt; db.goog0005_Australia_may.interviews.find({&apos;ident&apos;: {$regex: /^11952449|.*/}})&lt;/p&gt;
{ &quot;_id&quot; : ObjectId(&quot;4df92666fba5224032000000&quot;), &quot;ident&quot; : &quot;11952449|34050&quot; }
{ &quot;_id&quot; : ObjectId(&quot;4df92666fba5224032000001&quot;), &quot;ident&quot; : &quot;11952449|34050&quot; }

&lt;p&gt;With sort:&lt;br/&gt;
&amp;gt; db.goog0005_Australia_may.interviews.find({&apos;ident&apos;: {$regex: /^11952449|.*/}}).sort(&lt;/p&gt;
{&apos;_id&apos;: -1}
&lt;p&gt;)&lt;/p&gt;
{ &quot;_id&quot; : ObjectId(&quot;4df92666fba522403200000a&quot;), &quot;ident&quot; : &quot;11948252|34050&quot; }
{ &quot;_id&quot; : ObjectId(&quot;4df92666fba5224032000009&quot;), &quot;ident&quot; : &quot;11948208|34050&quot; }
{ &quot;_id&quot; : ObjectId(&quot;4df92666fba5224032000008&quot;), &quot;ident&quot; : &quot;11947965|34050&quot; }
{ &quot;_id&quot; : ObjectId(&quot;4df92666fba5224032000007&quot;), &quot;ident&quot; : &quot;11947861|34050&quot; }
{ &quot;_id&quot; : ObjectId(&quot;4df92666fba5224032000006&quot;), &quot;ident&quot; : &quot;11947846|34050&quot; }
{ &quot;_id&quot; : ObjectId(&quot;4df92666fba5224032000005&quot;), &quot;ident&quot; : &quot;11947723|34050&quot; }
{ &quot;_id&quot; : ObjectId(&quot;4df92666fba5224032000004&quot;), &quot;ident&quot; : &quot;11944922|34050&quot; }
{ &quot;_id&quot; : ObjectId(&quot;4df92666fba5224032000003&quot;), &quot;ident&quot; : &quot;11944870|34050&quot; }
{ &quot;_id&quot; : ObjectId(&quot;4df92666fba5224032000002&quot;), &quot;ident&quot; : &quot;11943967|34050&quot; }
{ &quot;_id&quot; : ObjectId(&quot;4df92666fba5224032000001&quot;), &quot;ident&quot; : &quot;11952449|34050&quot; }
{ &quot;_id&quot; : ObjectId(&quot;4df92666fba5224032000000&quot;), &quot;ident&quot; : &quot;11952449|34050&quot; }

&lt;p&gt;It gets weirder. Trying the same query a few seconds later (with sort()) returns the result set that was previously returned without sort():&lt;br/&gt;
&amp;gt; db.goog0005_Australia_may.interviews.find({&apos;ident&apos;: {$regex: /^11952449|.*/}}).sort(&lt;/p&gt;
{&apos;_id&apos;: -1}
&lt;p&gt;)&lt;/p&gt;
{ &quot;_id&quot; : ObjectId(&quot;4df92666fba5224032000001&quot;), &quot;ident&quot; : &quot;11952449|34050&quot; }
{ &quot;_id&quot; : ObjectId(&quot;4df92666fba5224032000000&quot;), &quot;ident&quot; : &quot;11952449|34050&quot; }

&lt;p&gt;Note: These examples are all from the mongo shell. The original report of this problem used pymongo examples to reproduce so it doesn&apos;t seem to be a shell problem.&lt;/p&gt;</description>
                <environment></environment>
        <key id="18328">SERVER-3269</key>
            <summary>Inconsistent results using $regex and sort() </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="3">Duplicate</resolution>
                                        <assignee username="aaron">Aaron Staple</assignee>
                                    <reporter username="bernie@mongodb.com">Bernie Hackett</reporter>
                        <labels>
                    </labels>
                <created>Wed, 15 Jun 2011 22:24:57 +0000</created>
                <updated>Fri, 30 Mar 2012 14:24:25 +0000</updated>
                            <resolved>Mon, 20 Jun 2011 18:26:31 +0000</resolved>
                                                                    <component>Querying</component>
                                        <votes>1</votes>
                                    <watches>2</watches>
                                                                                                                <comments>
                            <comment id="38355" author="aaron" created="Mon, 20 Jun 2011 18:26:31 +0000"  >&lt;p&gt;I filed &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-3298&quot; title=&quot;&amp;#39;simpleRegex&amp;#39; optimization may not work correctly if there is a regex | (bar) present&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-3298&quot;&gt;&lt;del&gt;SERVER-3298&lt;/del&gt;&lt;/a&gt; to cover this.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                                                <inwardlinks description="is related to">
                                                        </inwardlinks>
                                    </issuelinktype>
                    </issuelinks>
                <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                <customfield id="customfield_10050" key="com.atlassian.jira.toolkit:comments">
                        <customfieldname># Replies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Mon, 20 Jun 2011 18:26:31 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        12 years, 35 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>
                            12 years, 35 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>bernie@mongodb.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hroxqn:</customfieldvalue>

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

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

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