<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 03:46:53 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-18209] Add QUERY option to limit ARRAY size</title>
                <link>https://jira.mongodb.org/browse/SERVER-18209</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;Please add an option to limit the size of ANY array in the document.&lt;/p&gt;

&lt;p&gt;Motivation:&lt;br/&gt;
Relted to &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-18207&quot; title=&quot;Allow Queries for limit String sizes&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-18207&quot;&gt;&lt;del&gt;SERVER-18207&lt;/del&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Motivation:&lt;/p&gt;

&lt;p&gt;Our application parses data from MongoDB repositories that are populated by other application. Documents can have potentially large arrays objects at arbirary locations. The application retrieve the data, present the user with &quot;summary&quot; (e.g., showing data from the first few entries, followed by &quot;NNN more&quot;).&lt;/p&gt;

&lt;p&gt;The full entry is expanded once the user choose a specific document, and part of the document.&lt;/p&gt;

&lt;p&gt;The above change will reduce the amount of data that need to be fetched on the original calls. Currently, 100X data has transferred from Mongo, since there is no way to cap the size of the ARRAY.&lt;/p&gt;


&lt;p&gt;When working with documents that can contain arbitrary data sets, the application is forced to read &lt;/p&gt;</description>
                <environment></environment>
        <key id="200290">SERVER-18209</key>
            <summary>Add QUERY option to limit ARRAY size</summary>
                <type id="2" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14711&amp;avatarType=issuetype">New Feature</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="3">Duplicate</resolution>
                                        <assignee username="ramon.fernandez@mongodb.com">Ramon Fernandez Marina</assignee>
                                    <reporter username="yair.lenga@gmail.com">Yair Lenga</reporter>
                        <labels>
                    </labels>
                <created>Sat, 25 Apr 2015 10:59:05 +0000</created>
                <updated>Tue, 19 May 2015 20:31:48 +0000</updated>
                            <resolved>Fri, 15 May 2015 22:07:12 +0000</resolved>
                                                                    <component>Querying</component>
                                        <votes>0</votes>
                                    <watches>3</watches>
                                                                                                                <comments>
                            <comment id="918385" author="ramon.fernandez" created="Tue, 19 May 2015 20:31:48 +0000"  >&lt;p&gt;Hi &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=yair.lenga%40gmail.com&quot; class=&quot;user-hover&quot; rel=&quot;yair.lenga@gmail.com&quot;&gt;yair.lenga@gmail.com&lt;/a&gt;,&lt;/p&gt;

&lt;p&gt;apologies if I missed something when reading your tickets. I&apos;ll take a closer look at the comment above and compare it with &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-18210&quot; title=&quot;Add query for document structure&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-18210&quot;&gt;&lt;del&gt;SERVER-18210&lt;/del&gt;&lt;/a&gt; to see how it all fits together.&lt;/p&gt;

&lt;p&gt;Regards,&lt;br/&gt;
Ram&#243;n.&lt;/p&gt;</comment>
                            <comment id="915986" author="yair.lenga@gmail.com" created="Sat, 16 May 2015 11:16:59 +0000"  >&lt;p&gt;Ramon,&lt;/p&gt;

&lt;p&gt;I think that there are significant differences and benefits for the functionality requested  in 18207, 18208, 18209, compared with 18210.&lt;/p&gt;

&lt;p&gt;The short version is that all three will efficient retrieval of large documents where the client does not have information about the schema, with a single round-trip requests to the server. Compare this with 18210, which will&lt;/p&gt;
&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;Require much more complex processing of the data both in the server.&lt;/li&gt;
	&lt;li&gt;Require additional logic in the client side to take advantage of the schema information.&lt;/li&gt;
	&lt;li&gt;Require at least 2 round trips: One for the schema, one for top level data, and potentially additional round trips for deeply complex/nested data structures.&lt;/li&gt;
	&lt;li&gt;Require significant more development time to deliver&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;In practice, issues 18207, 18208, 18209 will deliver solutions that can be easily used by &quot;light-weight&quot; applications with minimal code changes. While 18210 is a much more complete solution it will apply to smaller set of application, where the extra effort of leveraging the information is justified.&lt;/p&gt;

&lt;p&gt;I will appreciate if you can reconsider. I believe that 18207, 18208, 18209 can be implemented (relatively) quickly, and will provide a short term good solution, while 18210 is likely take much more time and provide long term benefits.&lt;/p&gt;

&lt;p&gt;Regards&lt;br/&gt;
Yair.&lt;/p&gt;</comment>
                            <comment id="915762" author="ramon.fernandez" created="Fri, 15 May 2015 22:06:52 +0000"  >&lt;p&gt;Folding into &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-18210&quot; title=&quot;Add query for document structure&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-18210&quot;&gt;&lt;del&gt;SERVER-18210&lt;/del&gt;&lt;/a&gt;, as one would need to know if a field is an array before being able to use $slice.&lt;/p&gt;</comment>
                            <comment id="903881" author="yair.lenga@gmail.com" created="Sun, 3 May 2015 09:14:20 +0000"  >&lt;p&gt;Ticket still showing &quot;Waiting for User Input&quot;. See input above.&lt;/p&gt;</comment>
                            <comment id="898128" author="yair.lenga@gmail.com" created="Sat, 25 Apr 2015 19:05:29 +0000"  >&lt;p&gt;The problem is similar to &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-18208&quot; title=&quot;Allow Queries to find  ARRAY sizes&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-18208&quot;&gt;&lt;del&gt;SERVER-18208&lt;/del&gt;&lt;/a&gt;.&lt;br/&gt;
The $slice will work, IF the document structure is known, and is not expanded. When having to retrieve data from a document with unknown structure (in my cases, blocks of data added when data is available), the only way I could find, to find the name of the new series is to extract the whole document - forcing a massive read of the data.&lt;/p&gt;

&lt;p&gt;For example, if new data series are stored inside the document (like the one below), finding the tickers that have time series is difficult. The new operator will make it possible to run a fetch a limit. This fetch will return the keys of the document, and the item count. The code can on a &quot;find&quot; with a projection that will bring only the required data. At this point, &apos;$slice&apos; will help reducing the data set.&lt;/p&gt;

&lt;p&gt;{&lt;br/&gt;
    &quot;APPLE&quot;: [ ... ],&lt;br/&gt;
    &quot;GOOGLE&quot;: [ ... ],&lt;br/&gt;
    &quot;MUTUAL-FUNDS&quot;&quot;: &lt;/p&gt;
{
       &quot;FIDELITY&quot;: [ ... ],
    }
&lt;p&gt; ,&lt;br/&gt;
}&lt;/p&gt;

&lt;p&gt;For documents with large time series, this method can reduce the network cost per document from MB to few K.&lt;/p&gt;</comment>
                            <comment id="898064" author="ramon.fernandez" created="Sat, 25 Apr 2015 13:45:20 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=yair.lenga%40gmail.com&quot; class=&quot;user-hover&quot; rel=&quot;yair.lenga@gmail.com&quot;&gt;yair.lenga@gmail.com&lt;/a&gt;, I think &lt;a href=&quot;http://docs.mongodb.org/manual/reference/operator/projection/slice/#slice-projection&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;the $slice operator for projection&lt;/a&gt; may be what you&apos;re looking for &amp;#8211; can you please give it a try and see if it meets your needs?&lt;/p&gt;

&lt;p&gt;Thanks,&lt;br/&gt;
Ram&#243;n.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10010">
                    <name>Duplicate</name>
                                            <outwardlinks description="duplicates">
                                        <issuelink>
            <issuekey id="200291">SERVER-18210</issuekey>
        </issuelink>
                            </outwardlinks>
                                                        </issuelinktype>
                    </issuelinks>
                <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>Sat, 25 Apr 2015 13:45:20 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        8 years, 39 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>ramon.fernandez@mongodb.com</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            8 years, 39 weeks, 1 day ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                    <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>ramon.fernandez@mongodb.com</customfieldvalue>
            <customfieldvalue>yair.lenga@gmail.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hrl7en:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hs8rl3:</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_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|hrqkaf:</customfieldvalue>

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