<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 03:22:58 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-10363] User should be able to specify 2dsphere paramaters</title>
                <link>https://jira.mongodb.org/browse/SERVER-10363</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;My database has approximately 103 million documents representing polygons in the UK.&lt;/p&gt;

&lt;p&gt;Currently, a query for a 10x10m square can scan 500-100 rows and return 5.&lt;/p&gt;

&lt;p&gt;I know S2-geo-lib has the potential for cells of &amp;lt;2cm so I believe the default values in S2IndexingParams: &lt;/p&gt;

&lt;p&gt; maxCellsInCovering&lt;br/&gt;
 finestIndexedLevel&lt;br/&gt;
 coarsestIndexedLevel&lt;/p&gt;

&lt;p&gt;are inadequate for me at the moment, and so it would be beneficial to be able to set these upon index creation.&lt;/p&gt;
</description>
                <environment>all</environment>
        <key id="83738">SERVER-10363</key>
            <summary>User should be able to specify 2dsphere paramaters</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="9">Done</resolution>
                                        <assignee username="backlog-server-query">Backlog - Query Team</assignee>
                                    <reporter username="smremde">Stephen Remde</reporter>
                        <labels>
                            <label>indexing</label>
                    </labels>
                <created>Sun, 28 Jul 2013 11:44:32 +0000</created>
                <updated>Tue, 6 Dec 2022 05:19:09 +0000</updated>
                            <resolved>Tue, 12 Sep 2017 20:40:41 +0000</resolved>
                                    <version>2.4.0</version>
                                    <fixVersion>2.6.0</fixVersion>
                                    <component>Geo</component>
                                        <votes>2</votes>
                                    <watches>8</watches>
                                                                                                                <comments>
                            <comment id="1671173" author="asya" created="Tue, 12 Sep 2017 20:40:41 +0000"  >&lt;p&gt;This seems to have been fixed around version 2.5.5.&lt;/p&gt;</comment>
                            <comment id="1149220" author="smremde" created="Wed, 20 Jan 2016 21:31:53 +0000"  >&lt;p&gt;Dan Pasette - I think this can be closed now as finestIndexedLevel and coarsestIndexedLevel were already settable (but undocumented) and maxCellsInCovering is now implemented in &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-19168&quot; title=&quot;Finer default indexed level for indexing non-point geometries&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-19168&quot;&gt;&lt;del&gt;SERVER-19168&lt;/del&gt;&lt;/a&gt;. &lt;/p&gt;</comment>
                            <comment id="988711" author="kevin.albertson" created="Fri, 24 Jul 2015 21:28:03 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-19168&quot; title=&quot;Finer default indexed level for indexing non-point geometries&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-19168&quot;&gt;&lt;del&gt;SERVER-19168&lt;/del&gt;&lt;/a&gt; introduces maxCellsInCovering as an indexing parameter. Additionally, the default max cells for the next version of the 2dsphere index is lowered from 50 to 20.&lt;/p&gt;</comment>
                            <comment id="512145" author="dan@10gen.com" created="Sun, 9 Mar 2014 19:58:57 +0000"  >&lt;p&gt;This task is just missing maxCellsInCovering.  finestIndexedLevel and coarsestIndexedLevel are settable at index creation time.&lt;/p&gt;</comment>
                            <comment id="500656" author="smremde" created="Tue, 18 Feb 2014 15:02:59 +0000"  >&lt;p&gt;Hari Khalsa,&lt;br/&gt;
Thanks, this would be great. And thanks for confirming these parameters are not use in queries.&lt;/p&gt;

&lt;p&gt;Chris Lambert, see &lt;br/&gt;
&lt;a href=&quot;https://docs.google.com/presentation/d/1Hl4KapfAENAOf4gv-pSngKwvS_jwNVHRPZTTDzXXn6Q/edit#slide=id.i122&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://docs.google.com/presentation/d/1Hl4KapfAENAOf4gv-pSngKwvS_jwNVHRPZTTDzXXn6Q/edit#slide=id.i122&lt;/a&gt;&lt;/p&gt;
</comment>
                            <comment id="477724" author="xgen-internal-githook" created="Mon, 6 Jan 2014 17:23:24 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;username&apos;: u&apos;hkhalsa&apos;, u&apos;name&apos;: u&apos;Hari Khalsa&apos;, u&apos;email&apos;: u&apos;hkhalsa@10gen.com&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-10363&quot; title=&quot;User should be able to specify 2dsphere paramaters&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-10363&quot;&gt;&lt;del&gt;SERVER-10363&lt;/del&gt;&lt;/a&gt; &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-11387&quot; title=&quot;must take # of bits into account when using error to determine wrapping for 2d&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-11387&quot;&gt;&lt;del&gt;SERVER-11387&lt;/del&gt;&lt;/a&gt; pay attention to special geo idx params&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/e89dccbef9b83ac8101dcceab64f5c6e09b6de50&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/e89dccbef9b83ac8101dcceab64f5c6e09b6de50&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="460961" author="hari.khalsa@10gen.com" created="Sun, 24 Nov 2013 04:53:44 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=clambert%40lyft.com&quot; class=&quot;user-hover&quot; rel=&quot;clambert@lyft.com&quot;&gt;clambert@lyft.com&lt;/a&gt; Correct, the indexing and query code in the 2.5.x branch is in a state of flux and currently the extra 2dsphere parameters are ignored.  I will fix it soon in 2.5.x.  It should work in 2.4.x though.&lt;/p&gt;</comment>
                            <comment id="460949" author="clambert" created="Sun, 24 Nov 2013 02:36:48 +0000"  >&lt;p&gt;I overwrote coarsestIndexedLevel and finestIndexedLevel, but I think they&apos;re not used when creating the s2 criteria for a querying.&lt;/p&gt;

&lt;p&gt;If I issue a very large (by coverage area) $geoWithin, no documents are returned unless they lie on the edges of my polygon. This made me think it was using the default value for coarsestIndexedLevel when covering the polygon for index, rather than the one specified in the index. Line 51 seems to confirm my suspicions, but I don&apos;t know the code enough to be sure:&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://github.com/mongodb/mongo/blob/ab167c642f49206b4328882286cd5b83c19088bd/src/mongo/db/index/expression_index.h#L51&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/blob/ab167c642f49206b4328882286cd5b83c19088bd/src/mongo/db/index/expression_index.h#L51&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="457940" author="hari.khalsa@10gen.com" created="Mon, 18 Nov 2013 18:28:38 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=clambert&quot; class=&quot;user-hover&quot; rel=&quot;clambert&quot;&gt;clambert&lt;/a&gt;&lt;br/&gt;
1. They&apos;re safe to use.  I think they may currently be broken in 2.5.x but I should fix that shortly.&lt;/p&gt;

&lt;p&gt;2. Defaults:&lt;br/&gt;
int coarsestIndexedLevel = S2::kAvgEdge.GetClosestLevel(100 * 1000.0 / kRadiusOfEarthInMeters);&lt;br/&gt;
int finestIndexedLevel = S2::kAvgEdge.GetClosestLevel(500.0 / kRadiusOfEarthInMeters);&lt;/p&gt;

&lt;p&gt;So, should be ~ 500m and 100km on a side.  The idea was to be able to index continents but also search for things in a city.&lt;/p&gt;

&lt;p&gt;3. Not that I know of.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=smremde&quot; class=&quot;user-hover&quot; rel=&quot;smremde&quot;&gt;smremde&lt;/a&gt; I can make maxCells configurable.  It should be in a 2.5.x.  S2 uses it as an advisory parameter but hopefully it helps solve your problem.&lt;/p&gt;</comment>
                            <comment id="454870" author="clambert" created="Tue, 12 Nov 2013 08:51:00 +0000"  >&lt;p&gt;We&apos;re considering rolling our own s2/geohash based indexing solution since we can&apos;t seem to get efficient performance from Mongo&apos;s built in geospatial indexing, even with the new 2dsphere index type. I just found this ticket, though, and tuning finestIndexedLevel and coarsestIndexedLevel seems like it would help substantially. Before going down this road, I&apos;d love to know:&lt;/p&gt;

&lt;p&gt;1) Are these index options safe to use? They don&apos;t seem to be documented anywhere, so I want to make sure we can use them safely without support being pulled from a future version.&lt;br/&gt;
2) What are the default values? We obviously want to tune for the right tradeoff for our indexed geometry &amp;amp; query areas, but I&apos;d like to know what the defaults are to start with. as best as I can tell from reading the code, the finest level represents ~8 meter s2 cells, and the coarsest represents ~1.8km. Is this correct?&lt;br/&gt;
3) Is there a good page that lists s2cell levels and approximate coverage areas? I know Mongo&apos;s just using the open source S2 library, but I was wondering if anyone found a cheat sheet.&lt;/p&gt;</comment>
                            <comment id="397674" author="smremde" created="Wed, 7 Aug 2013 09:11:12 +0000"  >&lt;p&gt;So, from poking around the code, I found it is possible to set finestIndexedLevel and coarsestIndexedLevel, via the index options:&lt;/p&gt;

&lt;p&gt;db.collection.ensureIndex(&lt;/p&gt;
{geometry:&quot;2dsphere&quot;}
&lt;p&gt;, &lt;/p&gt;
{finestIndexedLevel:30, coarsestIndexedLevel:10}
&lt;p&gt;)&lt;/p&gt;

&lt;p&gt;This is enough for me IFF the default value for maxCellsInCovering was sensible. It is not.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10010">
                    <name>Duplicate</name>
                                                                <inwardlinks description="is duplicated by">
                                        <issuelink>
            <issuekey id="84970">SERVER-10451</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                            <outwardlinks description="related to">
                                        <issuelink>
            <issuekey id="1434523">SERVER-50172</issuekey>
        </issuelink>
                            </outwardlinks>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="207183">SERVER-18724</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="422644">SERVER-30915</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>11.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                <customfield id="customfield_12751" key="com.atlassian.jira.plugin.system.customfieldtypes:multiselect">
                        <customfieldname>Assigned Teams</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="25143"><![CDATA[Query]]></customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                            <customfield id="customfield_10011" key="com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons">
                        <customfieldname>Backwards Compatibility</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10038"><![CDATA[Fully Compatible]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                            <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Tue, 12 Nov 2013 08:51:00 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        6 years, 22 weeks, 1 day 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>alexander.golin@mongodb.com</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            6 years, 22 weeks, 1 day 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>asya.kamsky@mongodb.com</customfieldvalue>
            <customfieldvalue>backlog-server-query</customfieldvalue>
            <customfieldvalue>clambert</customfieldvalue>
            <customfieldvalue>dan@mongodb.com</customfieldvalue>
            <customfieldvalue>xgen-internal-githook</customfieldvalue>
            <customfieldvalue>hari.khalsa@10gen.com</customfieldvalue>
            <customfieldvalue>kevin.albertson@mongodb.com</customfieldvalue>
            <customfieldvalue>smremde</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hrml7b:</customfieldvalue>

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

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

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