<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 07:45:18 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>[DOCS-3241] Define sort order of BinData type in BSON Types reference</title>
                <link>https://jira.mongodb.org/browse/DOCS-3241</link>
                <project id="10380" key="DOCS">Documentation</project>
                    <description>&lt;p&gt;In neither the BSON 1.0 spec nor the &lt;a href=&quot;http://docs.mongodb.org/manual/reference/bson-types/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;MongoDB BSON Types Reference&lt;/a&gt; do we document the index sort order of BinData.&lt;/p&gt;

&lt;p&gt;We probably should include it in the MongoDB documentation since it is an important implementation detail. The actual sort order is:&lt;/p&gt;

&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;First compare length&lt;/li&gt;
	&lt;li&gt;Then compare the one-byte subtype&lt;/li&gt;
	&lt;li&gt;Then compare the content byte-by byte&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;It&apos;s defined in &lt;a href=&quot;https://github.com/mongodb/mongo/blame/v2.6/src/mongo/bson/bson-inl.h#L120-L124&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;bson/bson-inl.h&lt;/a&gt; and &lt;a href=&quot;https://github.com/mongodb/mongo/blame/v2.6/src/mongo/db/pipeline/value.cpp#L639-L649&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;db/pipeline/value.cpp&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The fact that size is compared first is surprising to some. See &lt;a href=&quot;https://github.com/mongodb/mongo/pull/666&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/pull/666&lt;/a&gt;, &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-3260&quot; title=&quot;Prefix Indexes&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-3260&quot;&gt;SERVER-3260&lt;/a&gt;, &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-9925&quot; title=&quot;Index covered binary prefix search&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-9925&quot;&gt;SERVER-9925&lt;/a&gt; for related discussions.&lt;/p&gt;</description>
                <environment></environment>
        <key id="132853">DOCS-3241</key>
            <summary>Define sort order of BinData type in BSON Types reference</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="tim.slavin">Tim Slavin</assignee>
                                    <reporter username="matt.kangas">Matt Kangas</reporter>
                        <labels>
                            <label>bson</label>
                            <label>indexing</label>
                    </labels>
                <created>Wed, 23 Apr 2014 16:07:04 +0000</created>
                <updated>Thu, 22 May 2014 15:20:33 +0000</updated>
                            <resolved>Thu, 22 May 2014 14:43:10 +0000</resolved>
                                                    <fixVersion>v1.3.5</fixVersion>
                                    <component>manual</component>
                        <due></due>
                            <votes>1</votes>
                                    <watches>2</watches>
                                                                                                                <comments>
                            <comment id="593001" author="xgen-internal-githook" created="Thu, 22 May 2014 14:39:34 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;username&apos;: u&apos;TimSlavinMongoDB&apos;, u&apos;name&apos;: u&apos;Tim Slavin (MongoDB)&apos;, u&apos;email&apos;: u&apos;tim.slavin@10gen.com&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/DOCS-3241&quot; title=&quot;Define sort order of BinData type in BSON Types reference&quot; class=&quot;issue-link&quot; data-issue-key=&quot;DOCS-3241&quot;&gt;&lt;del&gt;DOCS-3241&lt;/del&gt;&lt;/a&gt;: added BinData sort order section&lt;/p&gt;

&lt;p&gt;Signed-off-by: kay &amp;lt;kay.kim@10gen.com&amp;gt;&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/docs/commit/8e02957470b0ec03463b5c976d6b88d4dccf680b&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/docs/commit/8e02957470b0ec03463b5c976d6b88d4dccf680b&lt;/a&gt;&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10010">
                    <name>Duplicate</name>
                                                                <inwardlinks description="is duplicated by">
                                        <issuelink>
            <issuekey id="132850">SERVER-13697</issuekey>
        </issuelink>
                            </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_10855" key="com.atlassian.jira.plugin.system.customfieldtypes:float">
                        <customfieldname>Actual Time</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>Thu, 22 May 2014 14:39:34 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        9 years, 38 weeks, 6 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>jess.mokrzecki@mongodb.com</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            9 years, 38 weeks, 6 days ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                            <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>xgen-internal-githook</customfieldvalue>
            <customfieldvalue>matt.kangas</customfieldvalue>
            <customfieldvalue>tim.slavin</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hrr3r3:</customfieldvalue>

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

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

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