<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 07:42:00 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-1828] Comment on: &quot;manual/reference/operator/near.txt&quot;</title>
                <link>https://jira.mongodb.org/browse/DOCS-1828</link>
                <project id="10380" key="DOCS">Documentation</project>
                    <description>&lt;p&gt;Hi,&lt;/p&gt;

&lt;p&gt;I&apos;ve been doing some testing to make sure queries are working as expected when I migrate our dataset over to GeoJSON coordinates and a 2dsphere index. I&apos;ve noticed what I think is an error in the documentation for $near. It regards the units for $maxDistance.&lt;/p&gt;

&lt;p&gt;You mention that $maxDistance should be specified in radians for legacy coordinate pairs. I have been testing on a collection where documents have both legacy and GeoJSON coodinate pairs in separate fields. In this test environment I am running both a 2d and 2dsphere index (just for testing, as it works but I realize it is undocumented and could have unexpected consequences). I am comparing queries using the same centre point and converted radians-&amp;gt;metres $maxDistance.&lt;/p&gt;

&lt;p&gt;Centre: 37.755244,-122.444&lt;/p&gt;

&lt;p&gt;I first followed the documentation and used a $maxDistance of 1407m for the 2dsphere/GeoJSON query and 0.00022 rad (calc: 1407/6371000) for the legacy coodinate/2d query. The 2dsphere query returns 10 documents, the 2d query returns none. Next, instead of radians I tried using decimal degrees. A distance of 1407 m works out to about 0.016 degrees for the above centre location. This time the 2d query returns the same results as the 2dsphere query.&lt;/p&gt;

&lt;p&gt;I think the documentation should say &quot;If you query for legacy coordinate pairs, specify $maxDistance in decimal degrees.&quot; As I understand it, that is not the same thing as radians. I think that this change could really help people in the future as I&apos;ve spent a bunch of time figuring it out.&lt;/p&gt;

&lt;p&gt;If I&apos;ve missed something or just don&apos;t get it, I&apos;d love to hear about it! Also if you have any questions, please let me know.&lt;/p&gt;

&lt;p&gt;Cheers,&lt;br/&gt;
Jake&lt;br/&gt;
jake@cityseed.com&lt;/p&gt;</description>
                <environment>Mongo v2.4.4 hosted by MongoLab&lt;br/&gt;
&lt;br/&gt;
*Location*: &lt;a href=&quot;http://docs.mongodb.org/manual/reference/operator/near/&quot;&gt;http://docs.mongodb.org/manual/reference/operator/near/&lt;/a&gt;&lt;br/&gt;
*User-Agent*: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_4) AppleWebKit/536.30.1 (KHTML, like Gecko) Version/6.0.5 Safari/536.30.1&lt;br/&gt;
*Referrer*: &lt;a href=&quot;http://www.google.com/url?sa=t&amp;rct=j&amp;q=&amp;esrc=s&amp;source=web&amp;cd=1&amp;ved=0CC4QFjAA&amp;url=http%3A%2F%2Fdocs.mongodb.org%2Fmanual%2Freference%2Foperator%2Fnear&amp;ei=1lMSUvSsDoqMyQHlhYAw&amp;usg=AFQjCNE0k4sAyfIWH48iWxL8Ci03R2gsKg&amp;bvm=bv.50768961,d.aWc&quot;&gt;http://www.google.com/url?sa=t&amp;amp;rct=j&amp;amp;q=&amp;amp;esrc=s&amp;amp;source=web&amp;amp;cd=1&amp;amp;ved=0CC4QFjAA&amp;amp;url=http%3A%2F%2Fdocs.mongodb.org%2Fmanual%2Freference%2Foperator%2Fnear&amp;amp;ei=1lMSUvSsDoqMyQHlhYAw&amp;amp;usg=AFQjCNE0k4sAyfIWH48iWxL8Ci03R2gsKg&amp;amp;bvm=bv.50768961,d.aWc&lt;/a&gt;&lt;br/&gt;
*Screen Resolution*: 1280 x 800&lt;br/&gt;
*repo*: docs&lt;br/&gt;
*source*: reference/operator/near&lt;br/&gt;
</environment>
        <key id="86517">DOCS-1828</key>
            <summary>Comment on: &quot;manual/reference/operator/near.txt&quot;</summary>
                <type id="4" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14710&amp;avatarType=issuetype">Improvement</type>
                                            <priority id="4" iconUrl="https://jira.mongodb.org/images/icons/priorities/minor.svg">Minor - P4</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="2">Won&apos;t Fix</resolution>
                                        <assignee username="-1">Unassigned</assignee>
                                    <reporter username="jakeorr">Jake Orr</reporter>
                        <labels>
                            <label>collector-298ba4e7</label>
                    </labels>
                <created>Mon, 19 Aug 2013 17:50:55 +0000</created>
                <updated>Wed, 11 Jan 2017 22:38:43 +0000</updated>
                            <resolved>Wed, 27 Jul 2016 17:19:38 +0000</resolved>
                                                    <fixVersion>01112017-cleanup</fixVersion>
                                    <component>manual</component>
                        <due></due>
                            <votes>0</votes>
                                    <watches>2</watches>
                                                                                                                <comments>
                            <comment id="1337908" author="emily.hall" created="Wed, 27 Jul 2016 17:19:38 +0000"  >&lt;p&gt;Closed by Emily Hall for Housekeeping on 7/27/16.&lt;br/&gt;
Please create a new ticket if for prioritization.&lt;/p&gt;

&lt;p&gt;Thank you!&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>1.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Wed, 27 Jul 2016 17:19:38 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        7 years, 29 weeks 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>
                            7 years, 29 weeks ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                            <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>emily.hall</customfieldvalue>
            <customfieldvalue>jakeorr</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hrrqnz:</customfieldvalue>

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

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

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