<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 02:54:22 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-522] Better detection of regular expression constant prefix</title>
                <link>https://jira.mongodb.org/browse/SERVER-522</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;Documentation states: &quot;For regular expressions of the form /^&apos;&apos;normalchars&apos;&apos;.*/, the database will use an index when available and appropriate.&quot;&lt;/p&gt;

&lt;p&gt;However, the definition of &quot;normal chars&quot; as space, ascii letters and digits is hugely restrictive. For instance, our ids are URL paths. All of them of course starting with a /, making the indexes totally useless for our purposes.&lt;/p&gt;

&lt;p&gt;Please have a look at:&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://github.com/kali/mongo/commit/d1664437ef4b1c0dab490522f55521bcb6b04cc1&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://github.com/kali/mongo/commit/d1664437ef4b1c0dab490522f55521bcb6b04cc1&lt;/a&gt;&lt;/p&gt;</description>
                <environment></environment>
        <key id="11086">SERVER-522</key>
            <summary>Better detection of regular expression constant prefix</summary>
                <type id="4" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14710&amp;avatarType=issuetype">Improvement</type>
                                            <priority id="3" iconUrl="https://jira.mongodb.org/images/icons/priorities/major.svg">Major - P3</priority>
                        <status id="6" iconUrl="https://jira.mongodb.org/images/icons/statuses/closed.png" description="The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.">Closed</status>
                    <statusCategory id="3" key="done" colorName="success"/>
                                    <resolution id="9">Done</resolution>
                                        <assignee username="mathias@mongodb.com">Mathias Stearn</assignee>
                                    <reporter username="kali">Mathieu Poumeyrol</reporter>
                        <labels>
                    </labels>
                <created>Wed, 6 Jan 2010 12:17:50 +0000</created>
                <updated>Tue, 12 Jul 2016 00:28:19 +0000</updated>
                            <resolved>Fri, 15 Jan 2010 11:57:19 +0000</resolved>
                                                    <fixVersion>1.3.1</fixVersion>
                                    <component>JavaScript</component>
                    <component>Querying</component>
                                        <votes>0</votes>
                                    <watches>0</watches>
                                                                                                                <comments>
                            <comment id="11795" author="redbeard0531" created="Fri, 15 Jan 2010 11:57:19 +0000"  >&lt;p&gt;That should do it. According to man pcrepattern an non-alphanumeric that is preceded by a slash represents itself.&lt;/p&gt;</comment>
                            <comment id="11788" author="auto" created="Thu, 14 Jan 2010 23:53:04 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;Mathias Stearn&apos;, &apos;email&apos;: &apos;mathias@10gen.com&apos;}
&lt;p&gt;Message: Use indexes for regexes with escape chars &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-522&quot; title=&quot;Better detection of regular expression constant prefix&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-522&quot;&gt;&lt;del&gt;SERVER-522&lt;/del&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href=&quot;http://github.com/mongodb/mongo/commit/30403cdeb51b721ee0b68b9b61c69e62c2b00ae9&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://github.com/mongodb/mongo/commit/30403cdeb51b721ee0b68b9b61c69e62c2b00ae9&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="11742" author="redbeard0531" created="Wed, 13 Jan 2010 09:38:51 +0000"  >&lt;p&gt;I had assumed that /&lt;sup&gt;\/asdf/ would become RegExp(&apos;&lt;/sup&gt;/asdf&apos;). Instead JS does the opposite for some reason and adds the \ even when not needed.&lt;/p&gt;

&lt;p&gt;I also need to make simpleRegex support the {$regex: &quot;&quot;, $options: &quot;&quot;} syntax.&lt;/p&gt;</comment>
                            <comment id="11740" author="kali" created="Wed, 13 Jan 2010 02:20:32 +0000"  >&lt;p&gt;Sorry, this is indeed better than it was, but I think it is still not good enough, as it does not take into account the escaped metachars. In the case of URL, one need the slash, and the slash has to be escaped, as it is usually used as the regexp delimiter.&lt;/p&gt;

&lt;p&gt;My commit proposal in git make the code look a bit messy, but parsing regexp is messy. It manages the escaped characters, accepts UTF8 positions as well, and I provided some unit tests also. I am ready to rework this patch if there is something you don&apos;t like.&lt;/p&gt;</comment>
                            <comment id="11732" author="redbeard0531" created="Tue, 12 Jan 2010 21:22:21 +0000"  >&lt;p&gt;&lt;a href=&quot;http://github.com/mongodb/mongo/commit/e73ba7834e523505856aac3a29305b2822b9b37a&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://github.com/mongodb/mongo/commit/e73ba7834e523505856aac3a29305b2822b9b37a&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now will use all characters up-to the first PCRE &quot;meta-character&quot;. This should work with unicode chars as well.&lt;/p&gt;

&lt;p&gt;Also, setting the &apos;m&apos; (multiline) flag won&apos;t prevent an index from being used. Still need to support &apos;x&apos; (extended) but I doubt many people are using that in queries.&lt;/p&gt;</comment>
                            <comment id="11652" author="eliot" created="Wed, 6 Jan 2010 19:45:17 +0000"  >&lt;p&gt;Just need to tweak:     &lt;/p&gt;

&lt;p&gt;jsobj.cpp:string BSONElement::simpleRegex() const {&lt;/p&gt;

&lt;p&gt;make sure we have positive and negative tests&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>6.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Wed, 6 Jan 2010 19:45:17 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        14 years, 5 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_10057" key="com.atlassian.jira.toolkit:lastusercommented">
                        <customfieldname>Last comment by Customer</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>false</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                            <customfield id="customfield_10056" key="com.atlassian.jira.toolkit:lastupdaterorcommenter">
                        <customfieldname>Last commenter</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>ramon.fernandez@mongodb.com</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            14 years, 5 weeks, 5 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_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>auto</customfieldvalue>
            <customfieldvalue>eliot</customfieldvalue>
            <customfieldvalue>mathias@mongodb.com</customfieldvalue>
            <customfieldvalue>kali</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hrpt8f:</customfieldvalue>

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

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

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