<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Wed Feb 07 22:32:12 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>[COMPASS-3120] No support for negative regex, { $not: /regex/ } not accepted in query bar</title>
                <link>https://jira.mongodb.org/browse/COMPASS-3120</link>
                <project id="13182" key="COMPASS">Compass </project>
                    <description>&lt;p&gt;&#160;&lt;/p&gt;

&lt;p&gt;In the mongo shell, the $not operator is allowed and documented for use against regular expressions.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://docs.mongodb.com/manual/reference/operator/query/not/#not&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;$not&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;tt&gt;db.inventory.find( { item: { $not: /^p.*/ } } )&lt;/tt&gt;&lt;/p&gt;

&lt;p&gt;However, the Compass query bar does not accept this query.&lt;/p&gt;

&lt;p&gt;Please refer to the screenshots with both standard regex expression and $regex.&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;</description>
                <environment></environment>
        <key id="601786">COMPASS-3120</key>
            <summary>No support for negative regex, { $not: /regex/ } not accepted in query bar</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="13201">Fixed</resolution>
                                        <assignee username="durran.jordan@mongodb.com">Durran Jordan</assignee>
                                    <reporter username="brian.blevins@mongodb.com">Brian Blevins</reporter>
                        <labels>
                            <label>query-parser</label>
                    </labels>
                <created>Sun, 9 Sep 2018 13:32:45 +0000</created>
                <updated>Sun, 29 Oct 2023 02:41:15 +0000</updated>
                            <resolved>Tue, 24 Mar 2020 19:08:06 +0000</resolved>
                                    <version>1.15.1</version>
                                    <fixVersion>1.22.0</fixVersion>
                                    <component>Compass</component>
                    <component>Grammar</component>
                    <component>Query Bar</component>
                        <due></due>
                            <votes>3</votes>
                                    <watches>3</watches>
                                                                                                                <comments>
                            <comment id="2120222" author="brian.blevins" created="Fri, 18 Jan 2019 13:49:42 +0000"  >&lt;p&gt;&#160;&lt;br/&gt;
 With the understanding that regular expression evaluation on the database server is a relatively &lt;b&gt;expensive operation&lt;/b&gt; and complex expressions such as the following are even more taxing on server resources, it is possible in some situations to push the negation down into the regular expression itself.&#160; This provides a workaround for the lack of support for &lt;tt&gt;$not&lt;/tt&gt; in&#160;the Compass query bar for some use cases.&lt;/p&gt;

&lt;p&gt;To find all documents where the &lt;tt&gt;start station name&lt;/tt&gt; does not contain &quot;Ave&quot;, you can use the following:&lt;/p&gt;

&lt;p&gt;{ &apos;start station name&apos;: { $regex: &apos;^((?!Ave).)*$&apos; }}&lt;/p&gt;

&lt;p&gt;The example from the description of this ticket above can be expressed in Compass as:&lt;/p&gt;

&lt;p&gt;{ &apos;item&apos;: { $regex: &apos;^((?!^p).)*$&apos; }}&lt;/p&gt;

&lt;p&gt;Please refer to the documentation on &lt;a href=&quot;https://docs.mongodb.com/manual/reference/operator/query/regex/#regex&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;$regex&lt;/a&gt; and &lt;a href=&quot;https://docs.mongodb.com/manual/reference/operator/query/regex/#pcre-vs-javascript&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;PCRE vs Javascript&lt;/a&gt; for more information on the regular expressions accepted by &lt;tt&gt;$regex&lt;/tt&gt;.&#160; Since reasoning about negative &lt;a href=&quot;https://www.regular-expressions.info/lookaround.html&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;lookahead&lt;/a&gt;&#160;in regular expressions can be challenging, very thorough testing of this mechanism recommended.&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;</comment>
                            <comment id="2055237" author="randyeraymond" created="Wed, 7 Nov 2018 23:08:38 +0000"  >&lt;p&gt;I am glad this is here. I have been trying to run my query and wondered why it was not working. &lt;/p&gt;</comment>
                            <comment id="2000373" author="anna.herlihy@10gen.com" created="Wed, 12 Sep 2018 10:22:28 +0000"  >&lt;p&gt;This will go away when language-modes is implemented, but that likely won&apos;t be for another quarter or two so we can document this in the meantime.&#160;&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10520">
                    <name>Problem/Incident</name>
                                            <outwardlinks description="causes">
                                        <issuelink>
            <issuekey id="1144738">COMPASS-4146</issuekey>
        </issuelink>
                            </outwardlinks>
                                                        </issuelinktype>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                            <outwardlinks description="related to">
                                        <issuelink>
            <issuekey id="719138">COMPASS-3527</issuekey>
        </issuelink>
                            </outwardlinks>
                                                        </issuelinktype>
                    </issuelinks>
                <attachments>
                            <attachment id="195604" name="image-2018-09-09-09-31-50-970.png" size="31837" author="brian.blevins@mongodb.com" created="Sun, 9 Sep 2018 13:31:51 +0000"/>
                            <attachment id="195603" name="image-2018-09-09-09-32-25-075.png" size="49610" author="brian.blevins@mongodb.com" created="Sun, 9 Sep 2018 13:32:25 +0000"/>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                <customfield id="customfield_10050" key="com.atlassian.jira.toolkit:comments">
                        <customfieldname># Replies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>3.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Wed, 12 Sep 2018 10:22:28 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        5 years, 3 weeks, 5 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_10857" key="com.pyxis.greenhopper.jira:gh-epic-link">
                        <customfieldname>Epic Link</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>COMPASS-3417</customfieldvalue>
                        </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>luke.bonanomi@mongodb.com</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            5 years, 3 weeks, 5 days ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>anna.herlihy@mongodb.com</customfieldvalue>
            <customfieldvalue>brian.blevins@mongodb.com</customfieldvalue>
            <customfieldvalue>durran.jordan@mongodb.com</customfieldvalue>
            <customfieldvalue>RandyERaymond</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hu7iv3:</customfieldvalue>

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

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10558" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>9223372036854775807</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_10557" key="com.pyxis.greenhopper.jira:gh-sprint">
                        <customfieldname>Sprint</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue id="3785">Iteration Zebra</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_14350" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>serverRank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hu754f:</customfieldvalue>

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