<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 02:54:25 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-533] Aggregation stage to randomly sample documents</title>
                <link>https://jira.mongodb.org/browse/SERVER-533</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;We&apos;ve decided to go about this by adding a new aggregation stage: &lt;tt&gt;$sample&lt;/tt&gt;. Given a positive integer, the stage will pseudo-randomly choose that number of documents from the incoming stream of documents, which is implicitly the entire collection when &lt;tt&gt;$sample&lt;/tt&gt; is the first stage in the pipeline.&lt;/p&gt;

&lt;p&gt;Note that this ticket will only track the aggregation stage functionality, and this implementation will be very slow until &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-19183&quot; title=&quot;Allow storage engines to provide optimized random cursors for use by $sample&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-19183&quot;&gt;&lt;del&gt;SERVER-19183&lt;/del&gt;&lt;/a&gt; and &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-19182&quot; title=&quot;Integrate storage engine optimizations into $sample stage&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-19182&quot;&gt;&lt;del&gt;SERVER-19182&lt;/del&gt;&lt;/a&gt; are resolved.&lt;/p&gt;

&lt;p&gt;Original description:&lt;br/&gt;
Picking a random item from a collection is used in many cases. For example, you want a random item from the collection photos. Currently this can be accomplished by counting the resulting query, computing a random index within that count, and then getting that item with that random index.&lt;/p&gt;


&lt;p&gt;A easier approach would be requesting a random item directly from mongo given a query&lt;/p&gt;

&lt;p&gt;photos.find(&lt;/p&gt;
{&quot;author&quot;:&quot;johndoe&quot;}
&lt;p&gt;).random()&lt;br/&gt;
// this would act like .next() but instead would simply return a random item that matches the query&lt;/p&gt;

&lt;p&gt;photos.random_one(&lt;/p&gt;
{&quot;author&quot;:&quot;johndoe&quot;}
&lt;p&gt;)&lt;br/&gt;
// this would act just like find_one, except it would return a random item that matches the query&lt;/p&gt;</description>
                <environment>Global, all environments </environment>
        <key id="11109">SERVER-533</key>
            <summary>Aggregation stage to randomly sample documents</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="9">Done</resolution>
                                        <assignee username="charlie.swanson@mongodb.com">Charlie Swanson</assignee>
                                    <reporter username="janitha">Janitha Karunaratne</reporter>
                        <labels>
                    </labels>
                <created>Mon, 11 Jan 2010 22:57:11 +0000</created>
                <updated>Thu, 6 Apr 2023 21:31:36 +0000</updated>
                            <resolved>Mon, 20 Jul 2015 20:05:55 +0000</resolved>
                                                    <fixVersion>3.1.6</fixVersion>
                                    <component>Aggregation Framework</component>
                    <component>Index Maintenance</component>
                    <component>Usability</component>
                                        <votes>183</votes>
                                    <watches>147</watches>
                                                                                                                <comments>
                            <comment id="970301" author="xgen-internal-githook" created="Mon, 20 Jul 2015 20:04:03 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;username&apos;: u&apos;cswanson310&apos;, u&apos;name&apos;: u&apos;Charlie Swanson&apos;, u&apos;email&apos;: u&apos;charlie.swanson@mongodb.com&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-533&quot; title=&quot;Aggregation stage to randomly sample documents&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-533&quot;&gt;&lt;del&gt;SERVER-533&lt;/del&gt;&lt;/a&gt; Add aggregation stage to randomly sample documents&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/610765fdb94eebf612bd0172ec081ccc21110103&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/610765fdb94eebf612bd0172ec081ccc21110103&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="962772" author="charlie.swanson" created="Thu, 9 Jul 2015 22:19:23 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=davidn&quot; class=&quot;user-hover&quot; rel=&quot;davidn&quot;&gt;davidn&lt;/a&gt; the short answer is yes, the algorithm is sampling without replacement. However, it is not guaranteed that all returned documents will be unique, as that is not a guarantee of the query system (see &lt;a href=&quot;http://docs.mongodb.org/manual/core/cursors/#cursor-isolation&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;here&lt;/a&gt;)&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=Jeroenooms&quot; class=&quot;user-hover&quot; rel=&quot;Jeroenooms&quot;&gt;Jeroenooms&lt;/a&gt; while sampling with replacement would be nice, it is out of scope for this part of the project. If this is an important functionality for you, please open a new issue so we can track that work.&lt;/p&gt;</comment>
                            <comment id="953101" author="jeroenooms" created="Mon, 29 Jun 2015 14:49:09 +0000"  >&lt;p&gt;Actually if there would be an additional option for sampling with replacement, that would open up some very powerful statistical applications.&lt;/p&gt;</comment>
                            <comment id="953093" author="davidn" created="Mon, 29 Jun 2015 14:44:17 +0000"  >&lt;p&gt;Based on the description it sounds like this is sampling without replacement. Right?&lt;/p&gt;</comment>
                            <comment id="953084" author="charlie.swanson" created="Mon, 29 Jun 2015 14:38:53 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=rgpublic&quot; class=&quot;user-hover&quot; rel=&quot;rgpublic&quot;&gt;rgpublic&lt;/a&gt;, I have updated the description to match what we plan to do.&lt;/p&gt;</comment>
                            <comment id="953037" author="rgpublic" created="Mon, 29 Jun 2015 14:10:46 +0000"  >&lt;p&gt;Just wondering: If this feature is implemented... What if I need multiple random items? Say 4 random photos out of a collection of 100000 photos. Will I have to call this option multiple times and hope that it isn&apos;t the same item again until I have enough items?  Wouldn&apos;t that be inefficient? Should this be implemented in the database as well?&lt;/p&gt;</comment>
                            <comment id="946442" author="octante" created="Sun, 21 Jun 2015 17:52:38 +0000"  >&lt;p&gt;+1!!&lt;/p&gt;</comment>
                            <comment id="940245" author="auny" created="Mon, 15 Jun 2015 13:00:48 +0000"  >&lt;p&gt;+1 for this feature.&lt;/p&gt;</comment>
                            <comment id="880261" author="codeninja" created="Mon, 13 Apr 2015 23:09:59 +0000"  >&lt;p&gt;+1 For this feature we have been waiting for quite some time, lets push this for the next sub release like 3.1. Need a way to efficiently generate random records without using hacks like this db.yourCollection.find().limit(-1).skip(yourRandomNumber).next()&lt;/p&gt;</comment>
                            <comment id="873186" author="jeroenooms" created="Mon, 6 Apr 2015 04:15:43 +0000"  >&lt;p&gt;+1 for built-in random sorting. Taking a random sample from a dataset is required by many applications in statistics and data-science in order to generalize properties of the sample to the larger dataset.&lt;/p&gt;</comment>
                            <comment id="814787" author="alice@gothcandy.com" created="Tue, 27 Jan 2015 21:18:38 +0000"  >&lt;p&gt;+1 for a &lt;tt&gt;$random&lt;/tt&gt; option to aggregation sort, but this would also be useful in normal queries.  &lt;tt&gt;query.order_by(&apos;$rand&apos;)&lt;/tt&gt; or some-such.  Basically switch the sort mechanism from &quot;quick sort&quot; (or whatever is actually in use &lt;img class=&quot;emoticon&quot; src=&quot;https://jira.mongodb.org/images/icons/emoticons/wink.png&quot; height=&quot;16&quot; width=&quot;16&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt; to a bogosort which randomizes the available choices.&lt;/p&gt;</comment>
                            <comment id="728923" author="JIRAUSER1257678" created="Sun, 28 Sep 2014 11:40:33 +0000"  >&lt;p&gt;If this does happen then a way to seed the random so a particular result can be reproduced if needed would be much appreciated. By me at least &lt;img class=&quot;emoticon&quot; src=&quot;https://jira.mongodb.org/images/icons/emoticons/smile.png&quot; height=&quot;16&quot; width=&quot;16&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt;&lt;/p&gt;</comment>
                            <comment id="608909" author="tomlor" created="Thu, 5 Jun 2014 00:45:00 +0000"  >&lt;p&gt;It seems like pulling random records could be accomplished easily by simply adding a new $random expression to the aggregation framework.&lt;/p&gt;

&lt;p&gt;Then you can, say, query for 5 random people of age 25:&lt;/p&gt;

&lt;p&gt;db.foo.aggregate(&lt;br/&gt;
   [{ $match : &lt;/p&gt;
{ age: 25 }
&lt;p&gt; },&lt;br/&gt;
    { $project : { rand : &quot;$random&quot; }},&lt;br/&gt;
    { $sort : &lt;/p&gt;
{ rand: 1 }
&lt;p&gt; },&lt;br/&gt;
    &lt;/p&gt;
{ $limit : 5 }
&lt;p&gt; ]&lt;br/&gt;
);&lt;/p&gt;</comment>
                            <comment id="481695" author="jrschumacher" created="Tue, 14 Jan 2014 14:32:54 +0000"  >&lt;p&gt;Post a new question on Stackoverflow or use the Google+ community page, this is not the place for these questions.&lt;/p&gt;</comment>
                            <comment id="481674" author="acnalesso" created="Tue, 14 Jan 2014 13:33:22 +0000"  >&lt;p&gt;Hi there,&lt;br/&gt;
Thanks for your reply.&lt;/p&gt;

&lt;p&gt;I have tried some of the solution from that stackoverflow link, but they seem not to work properly.&lt;br/&gt;
On e solution I came up with was&lt;br/&gt;
Model.offset(Model.count).limit(1).first&lt;/p&gt;

&lt;p&gt;This seems to be working fine, however, I am aware that it may not scale right?&lt;br/&gt;
I am willing to design/write this feature for mongodb, could you give me some insight?&lt;br/&gt;
I&apos;ve started reading mongodb source code but I&apos;m a bit lost. Any ideas would be very helpful.&lt;/p&gt;

&lt;p&gt;Thanks you&lt;/p&gt;

&lt;p&gt;with regards,&lt;br/&gt;
Nalesso Antonio&lt;/p&gt;



&lt;p&gt;On Tuesday, 14 January 2014, 7:19, Ryan Hamilton-Schumacher (JIRA) &amp;lt;jira@mongodb.org&amp;gt; wrote:&lt;/p&gt;


&lt;p&gt;&#160; &#160; [ &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-533?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&amp;amp;focusedCommentId=481598#comment-481598&quot; class=&quot;external-link&quot; rel=&quot;nofollow&quot;&gt;https://jira.mongodb.org/browse/SERVER-533?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&amp;amp;focusedCommentId=481598#comment-481598&lt;/a&gt; ] &lt;/p&gt;

&lt;p&gt;Ryan Hamilton-Schumacher commented on &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-533&quot; title=&quot;Aggregation stage to randomly sample documents&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-533&quot;&gt;&lt;del&gt;SERVER-533&lt;/del&gt;&lt;/a&gt;:&lt;br/&gt;
-------------------------------------------------&lt;/p&gt;

&lt;p&gt;Someone has to implement it, but I would guess it will take some time in both design and execution to do it right. I would not hold your breath but use one of the various alternatives &lt;a href=&quot;http://stackoverflow.com/questions/2824157/random-record-from-mongodb/5517206&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://stackoverflow.com/questions/2824157/random-record-from-mongodb/5517206&lt;/a&gt;&lt;br/&gt;
&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &lt;/p&gt;

&lt;p&gt;&amp;#8211;&lt;br/&gt;
This message is automatically generated by JIRA.&lt;br/&gt;
If you think it was sent incorrectly, please contact your JIRA administrators&lt;br/&gt;
For more information on JIRA, see: &lt;a href=&quot;http://www.atlassian.com/software/jira&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://www.atlassian.com/software/jira&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="481598" author="jrschumacher" created="Tue, 14 Jan 2014 07:18:06 +0000"  >&lt;p&gt;Someone has to implement it, but I would guess it will take some time in both design and execution to do it right. I would not hold your breath but use one of the various alternatives &lt;a href=&quot;http://stackoverflow.com/questions/2824157/random-record-from-mongodb/5517206&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://stackoverflow.com/questions/2824157/random-record-from-mongodb/5517206&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="481523" author="acnalesso" created="Tue, 14 Jan 2014 03:39:23 +0000"  >&lt;p&gt;Dear Ryan,&lt;br/&gt;
Does it mean that somebody would have to implement this feature, or it is already implemented?&lt;br/&gt;
I am sorry for my lack of knowledge and thanks anyway for your reply.&lt;/p&gt;

&lt;p&gt;&lt;img class=&quot;emoticon&quot; src=&quot;https://jira.mongodb.org/images/icons/emoticons/smile.png&quot; height=&quot;16&quot; width=&quot;16&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt;&#160;&lt;/p&gt;



&lt;p&gt;On Tuesday, 14 January 2014, 2:23, Ryan Hamilton-Schumacher (JIRA) &amp;lt;jira@mongodb.org&amp;gt; wrote:&lt;/p&gt;


&lt;p&gt;&#160; &#160; [ &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-533?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&amp;amp;focusedCommentId=481474#comment-481474&quot; class=&quot;external-link&quot; rel=&quot;nofollow&quot;&gt;https://jira.mongodb.org/browse/SERVER-533?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&amp;amp;focusedCommentId=481474#comment-481474&lt;/a&gt; ] &lt;/p&gt;

&lt;p&gt;Ryan Hamilton-Schumacher commented on &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-533&quot; title=&quot;Aggregation stage to randomly sample documents&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-533&quot;&gt;&lt;del&gt;SERVER-533&lt;/del&gt;&lt;/a&gt;:&lt;br/&gt;
-------------------------------------------------&lt;/p&gt;

&lt;p&gt;@Antonio there is nothing to merge. See the Fix Version === &quot;planned but not scheduled&quot;&lt;br/&gt;
&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &lt;/p&gt;

&lt;p&gt;&amp;#8211;&lt;br/&gt;
This message is automatically generated by JIRA.&lt;br/&gt;
If you think it was sent incorrectly, please contact your JIRA administrators&lt;br/&gt;
For more information on JIRA, see: &lt;a href=&quot;http://www.atlassian.com/software/jira&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://www.atlassian.com/software/jira&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="481474" author="jrschumacher" created="Tue, 14 Jan 2014 01:52:50 +0000"  >&lt;p&gt;@Antonio there is nothing to merge. See the Fix Version === &quot;planned but not scheduled&quot;&lt;/p&gt;</comment>
                            <comment id="481260" author="acnalesso" created="Mon, 13 Jan 2014 21:20:09 +0000"  >&lt;p&gt;Hi there,&lt;br/&gt;
Is there any chance to get this merged?&lt;br/&gt;
It is as awesome feature and it does not seem to have the desired attention?&lt;br/&gt;
Everybody here seems to agree with that too, could someone tell me why it hasn&apos;t been merged yet?&lt;/p&gt;

&lt;p&gt;Kind regards,&lt;br/&gt;
Nalesso Antonio&lt;/p&gt;</comment>
                            <comment id="477348" author="jaromir muller" created="Sun, 5 Jan 2014 15:43:08 +0000"  >&lt;p&gt;+1&lt;/p&gt;</comment>
                            <comment id="447359" author="dkarrenbeld" created="Mon, 28 Oct 2013 00:23:38 +0000"  >&lt;p&gt;@Victor Hooi, you can, by skipping a random number of records and then selecting one. Yay for skip.&lt;/p&gt;</comment>
                            <comment id="447354" author="victorhooi@yahoo.com" created="Mon, 28 Oct 2013 00:16:24 +0000"  >&lt;p&gt;I&apos;m working on a product recommendation system, and for one mode, we needed a firehose of randomised products.&lt;/p&gt;

&lt;p&gt;Doing a count and selecting based on ID isn&apos;t a viable option, since we can&apos;t assume that the product IDs are contiguous.&lt;/p&gt;

&lt;p&gt;It would be nice if MongoDB offered some kind of syntax to handle this easily.&lt;/p&gt;</comment>
                            <comment id="430999" author="tolstenko" created="Wed, 25 Sep 2013 12:03:18 +0000"  >&lt;p&gt;This feature will help me a lot!&lt;/p&gt;</comment>
                            <comment id="410989" author="davidn" created="Sun, 25 Aug 2013 15:56:12 +0000"  >&lt;p&gt;I have a need for random sampling of a collection too. I hope this comment helps point the way to a solution.&lt;/p&gt;

&lt;p&gt;There are two kinds of random sampling: without replacement and with replacement. People above seem to be divided about which type they need. I believe that sampling without replacement is more commonly needed.   &lt;/p&gt;

&lt;p&gt;I think the best way to implement both types is with a random iterator. In the case of sampling with replacement (drawing balls from the urn and putting them back), the iterator would return any document in the cursor with equal probability, and never reach the &quot;end.&quot;&lt;/p&gt;

&lt;p&gt;In the case of sampling without replacement, The iterator would have to internally remove iterated docs from the cursor before selecting the &quot;next&quot; one from the remaining sample with equal probability. This cursor would end when all docs have been iterated.&lt;/p&gt;

&lt;p&gt;An easy but much less efficient way to get sampling without replacement would be to just apply a random shuffle to the cursor before iterating begins, then use the normal iterator. I bet this would an acceptable solution to many if not most use cases.&lt;/p&gt;

&lt;p&gt;Because MongoDB is designed around iterating results and not list based access, the most efficient place to implement these features is internal to MongoDB. I would really benefit from sampling without replacement and hope you&apos;ll schedule this feature.&lt;/p&gt;</comment>
                            <comment id="392217" author="hyde" created="Tue, 30 Jul 2013 22:12:44 +0000"  >&lt;p&gt;I need this feature too. The cookbook&apos;s solution is not a good option: I have detected some documents are more frequent than others.&lt;/p&gt;</comment>
                            <comment id="391642" author="codernumber1" created="Tue, 30 Jul 2013 08:16:51 +0000"  >&lt;blockquote&gt;&lt;p&gt;...we&apos;d like to see usage cases that feel less esoteric that would justify building that machinery inside the server.&lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;I have a large collection of users, stored in MongoDB, and I need to implement some split tests on small randomly chosen groups of users. And I want those groups to be random each time, so I don&apos;t add random &apos;split ID&apos; to user records stored.&lt;/p&gt;

&lt;p&gt;Random queries are useful, please implement them &amp;#94;____&amp;#94;&lt;/p&gt;</comment>
                            <comment id="373552" author="terkhorn" created="Wed, 3 Jul 2013 17:42:47 +0000"  >&lt;p&gt;Agreed, this would be a great feature to have!&lt;/p&gt;</comment>
                            <comment id="348407" author="shalmanese" created="Wed, 29 May 2013 23:50:20 +0000"  >&lt;p&gt;Would love to see this implemented!&lt;/p&gt;</comment>
                            <comment id="309498" author="ijinasena" created="Tue, 9 Apr 2013 17:06:28 +0000"  >&lt;p&gt;I wish a random option would be implemented. Any news about .random being featured in a upcoming release? &lt;/p&gt;</comment>
                            <comment id="306593" author="elvar" created="Fri, 5 Apr 2013 09:59:38 +0000"  >&lt;p&gt;This really needs to be implemented. Really frustrating that you need to add extra keys to your document, in order to achieve a random result, also it feels really hacky. &lt;/p&gt;</comment>
                            <comment id="293615" author="akamensky" created="Wed, 20 Mar 2013 04:03:30 +0000"  >&lt;p&gt;@dimonb,&lt;/p&gt;

&lt;p&gt;Dmitry,&lt;br/&gt;
That&apos;s not an option in our case. Collection is changing constantly, many items are being removed/added/updated every day/hour/minute.&lt;br/&gt;
Also in this case what &quot;persistent enough&quot; means? Personally i would not accept a code with possibility of situation where i can have unpredictable behavior. Let&apos;s say the random number in this list is 10 and item 10 was removed, should i also in code handle this situation? Sounds like an overkill to me.&lt;/p&gt;</comment>
                            <comment id="221706" author="JIRAUSER1253715" created="Fri, 21 Dec 2012 21:55:25 +0000"  >&lt;p&gt;Alexey,&lt;br/&gt;
If your collection of documents is persistent enough you could use icrementing field instead of random field. And select documents using $in statement and random list in a known range.&lt;/p&gt;</comment>
                            <comment id="221667" author="engenyn" created="Fri, 21 Dec 2012 21:06:22 +0000"  >&lt;p&gt;Pleeeeeeeeeeeeeeeeease, implement it.&lt;/p&gt;</comment>
                            <comment id="220130" author="akamensky" created="Thu, 20 Dec 2012 09:16:18 +0000"  >&lt;p&gt;Currently working on large collection. The solution with random parameter is a real pain. We often need to get a random&lt;img class=&quot;emoticon&quot; src=&quot;https://jira.mongodb.org/images/icons/emoticons/warning.png&quot; height=&quot;16&quot; width=&quot;16&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt; subset from collection. And there is not good way to do that.&lt;br/&gt;
What we currently do is to add random parameter to the document and each time after we request random subset we need to go through all documents and update parameter with new random value. This is getting more painful as collection grows.&lt;/p&gt;

&lt;p&gt;I think&lt;br/&gt;
photos.find(&lt;/p&gt;
{&quot;author&quot;:&quot;johndoe&quot;}
&lt;p&gt;).sort(&lt;/p&gt;
{&quot;$random&quot;:1}
&lt;p&gt;)&lt;br/&gt;
makes perfect sense in this application.&lt;/p&gt;</comment>
                            <comment id="209432" author="engenyn" created="Fri, 7 Dec 2012 23:58:53 +0000"  >&lt;p&gt;I want&lt;br/&gt;
photos.find(&lt;/p&gt;
{&quot;author&quot;:&quot;johndoe&quot;}
&lt;p&gt;).sort(&lt;/p&gt;
{&quot;$random&quot;:1}
&lt;p&gt;) &lt;/p&gt;</comment>
                            <comment id="183961" author="tlaunay" created="Thu, 8 Nov 2012 08:20:32 +0000"  >&lt;p&gt;I really wish there was a built-in, simple, no non-sense way to get random data from a database. A .random() option would totally fit my needs.&lt;/p&gt;

&lt;p&gt;Here&apos;s a simplified overview of my application and needs. I am using 3 tables: A (user) B (product) and C (score).&lt;/p&gt;

&lt;p&gt;The industrial process behind these tables rely on the user (a from A) picking a product (b from B) and giving it a score (c in C, that corresponds to a unique pair (a, b)).&lt;/p&gt;

&lt;p&gt;However we would like to te able to estimate the average score over the whole db. We do not have every score possible (and will not ever), and the user usually scores products he/she&apos;s &quot;interested&quot; in.&lt;/p&gt;

&lt;p&gt;This is why we would like to randomly draw a user and a product, and ask the user to note this product so as to estimate the average note &#224; la Monte Carlo.&lt;/p&gt;</comment>
                            <comment id="153494" author="fredy.ns" created="Wed, 15 Aug 2012 04:17:48 +0000"  >&lt;p&gt;i need this function to draw random question on my quiz application, completely random.&lt;/p&gt;

&lt;p&gt;i hope this would completely resolved.&lt;/p&gt;</comment>
                            <comment id="151147" author="gbraad" created="Tue, 7 Aug 2012 15:25:56 +0000"  >&lt;p&gt;Currently modeling a language test system using Mongo as the back-end storage. For generation of preparation test sets I would like data to be retrieved as a random set from a collection. At the moment I realize this will involve a lot more work on the back-end code than necessary...&lt;/p&gt;

&lt;p&gt;... I wish a random option would be available.&lt;/p&gt;</comment>
                            <comment id="133442" author="djames" created="Fri, 15 Jun 2012 20:01:27 +0000"  >&lt;p&gt;Bu-bump! The comments above are spot on.&lt;/p&gt;

&lt;p&gt;I&apos;m putting a good amount of data into Mongo. I want to query some of it randomly. Having the database know how to do this just makes sense.&lt;/p&gt;

&lt;p&gt;I&apos;ve paid a lot more attention to random numbers in the past year or so. Enough to say this: most people (including myself) have a tendency to mess up randomness in their code without even realizing it. This should be solved well by the MongoDB engineering team so application developers don&apos;t bork it up over and over again. Surely the 10gen team can think it through and come up with a good solution for most people?&lt;/p&gt;

&lt;p&gt;I&apos;m not saying this is easy or trivial to fix; this ticket raises some interesting points! (1) The skip and limit modifiers don&apos;t scale well. (2) The random number field index &quot;solution&quot; is creative but still a hack. (3) ... (And there are lots of details I haven&apos;t examined.)&lt;/p&gt;

&lt;p&gt;This is something I take for granted with relational DBs. So, I&apos;m currently on a mission to raise awareness about this. I think I&apos;ll write a blog post. The title? &quot;MongoDB loses, randomly, to relational databases!&quot;&lt;/p&gt;</comment>
                            <comment id="78720" author="lacker" created="Tue, 10 Jan 2012 02:18:26 +0000"  >&lt;p&gt;The cookbook solution is not actually random if you use it more than once, in the sense that multiple lookups will not be independent. If a particular entry has a random field that is particularly far away from adjacent entries, it will be more likely on each lookup. So it doesn&apos;t really work if you are doing the lookup more than once, which is pretty common.&lt;/p&gt;</comment>
                            <comment id="72977" author="andybaird" created="Wed, 14 Dec 2011 06:06:13 +0000"  >&lt;p&gt;Just started using Mongo for a Facebook game I&apos;m making. Random order on a result set is quite useful for many different game aspects as a way to involve chance as a game element.&lt;/p&gt;

&lt;p&gt;Maybe that&apos;s not a major use case, but I was really surprised that Mongo didn&apos;t already support this. &lt;/p&gt;</comment>
                            <comment id="69184" author="m.korbakov@nimble.com" created="Mon, 28 Nov 2011 09:15:36 +0000"  >&lt;p&gt;This feature is also really useful when you need to compare different indexing schemes for huge collection. Doing complete indexing can easily be as long as full day per index. Whey all you need is compare index entry size per document it&apos;s better to do experiments on random subset of full collection.&lt;/p&gt;</comment>
                            <comment id="66408" author="sktayloriii" created="Sun, 13 Nov 2011 05:01:31 +0000"  >&lt;p&gt;This would be a very valuable feature, not to mention the solutions to roll your own aren&apos;t very robust, and the use case is pretty common: for us it&apos;s displaying randomized data in a right rail, other articles, users, etc.&lt;/p&gt;</comment>
                            <comment id="63385" author="leopd" created="Fri, 28 Oct 2011 18:37:33 +0000"  >&lt;p&gt;@Eliot, I like the random walk into the B-tree idea.  O(X * log(N)) would be a vast improvement over the O(X + N*log(N)) solution that mysql appears to use.&lt;/p&gt;

&lt;p&gt;Would this work on result results without indexes?  Like capped collections?&lt;/p&gt;</comment>
                            <comment id="58571" author="rwillmer" created="Wed, 5 Oct 2011 10:28:02 +0000"  >&lt;p&gt;This was closed as &quot;Won&apos;t Fix&quot; 18 months ago. Why? You&apos;re asking everyone who needs this feature to reimplement their own solution, whereas in most dbs that people might be familiar with, this would be considered part of the standard functionality.&lt;/p&gt;

&lt;p&gt;Any change on this stance in the last 18 months?&lt;/p&gt;</comment>
                            <comment id="26700" author="jjudge" created="Thu, 24 Mar 2011 16:40:19 +0000"  >&lt;p&gt;Alberto, &lt;/p&gt;

&lt;p&gt;Two good use cases with email marketing: &lt;/p&gt;

&lt;p&gt;1) Companies like to A/B test email copy and it&apos;s helpful to grab a couple sets of random subscribers (say 1000 each) to compare engagement &lt;/p&gt;

&lt;p&gt;2) When dealing with large sets of data (say 6MM subscribers), it&apos;s helpful to grab a 1000 random records to determine what percentage of the records match specific types of attributes. For example, if we know 673 people out of the 1000 are interested in receiving daily deals, we can apply statistical analysis to the larger set to see approximately how many people in total would be interested. It&apos;s better to do this analysis against a smaller data set for performance reasons, then go create the segment in the background after you&apos;re done doing your analysis. &lt;/p&gt;

&lt;p&gt;My company is currently dealing with different ways to do #1 above with CouchDB, and we&apos;ve been considering moving our user attribute data to MongoDB because of it&apos;s flexibility. Creating a random collection in Mongo would be super helpful for us. &lt;/p&gt;

&lt;p&gt;Thanks, &lt;br/&gt;
Jeff &lt;/p&gt;</comment>
                            <comment id="15107" author="alerner" created="Sun, 27 Jun 2010 18:39:47 +0000"  >&lt;p&gt;phpMoAdmin,&lt;/p&gt;

&lt;p&gt;None of the two solutions on the Cookbook address a find(). They apply to one random element of the result with findOne() and to a map reduction over a sample of data, respectively. &lt;/p&gt;

&lt;p&gt;Sorting animals per race in a compound key with gender and age... yes, that seems rather specific. If that is the killer feature for more apps, all I&apos;m asking is a bit more information so to to figure out how to make the important cases faster, if we were to make this a feature in the server. &lt;/p&gt;</comment>
                            <comment id="15106" author="phpmoadmin" created="Sun, 27 Jun 2010 02:44:50 +0000"  >&lt;p&gt;With the cookbook solution, wouldn&apos;t the results of find() (not findOne() ) always be returned in the same order? Yes, the starting point is random, but subsequent results based on $gt/$lt would work off of the fixed &quot;random&quot; key in the data.&lt;/p&gt;

&lt;p&gt;Alberto, are you suggesting that a randomly-ordered resultset is an esoteric usage-case?&lt;/p&gt;</comment>
                            <comment id="15045" author="alerner" created="Thu, 24 Jun 2010 04:23:55 +0000"  >&lt;p&gt;Loic, I think what you mean is that you have a case that doesn&apos;t match the ones described by the receipe. The first case requests a &lt;b&gt;single&lt;/b&gt; random document, not many, as you assumed. So, yes, the techniques in there do not match all the cases.&lt;/p&gt;

&lt;p&gt;The behavior you suggest is reasonable. But we&apos;d like to see usage cases that feel less esoteric that would justify building that machinery inside the server. &lt;/p&gt;

</comment>
                            <comment id="15027" author="llacroix" created="Wed, 23 Jun 2010 16:51:16 +0000"  >&lt;p&gt;I don&apos;t believe that the cookbook recipe is an actual solution. Even if you query a random number and each document have a random number in them, it wouldn&apos;t work if you want to return more documents than the actual query match. &lt;br/&gt;
$gt or $lt random will return an undefined amount of datas. So you could put a limit of 100 but even if there is 100000 documents, there is a chance that you will only query 10 documents in that range, it requires an additional field and that makes the data structure a bit weird. To have a better randomization. An othe problem is that documents that have random value that is close to each others may often be queried together. &lt;/p&gt;

&lt;p&gt;To me, I&apos;d see a sort this way, &lt;/p&gt;

&lt;p&gt;db.coll.find().sort(&lt;/p&gt;
{&apos;field&apos;: RANDOM}
&lt;p&gt;)&lt;/p&gt;

&lt;p&gt;that way it is possible to walk a cursor. Internally, there could be two behaviour&lt;/p&gt;

&lt;p&gt;1. return a random item up to the limit of queried elements and no elements can be returned more than once&lt;br/&gt;
2. return items up to the specified limit on the query or the amount of item&lt;br/&gt;
    2.1 items can be returned more than once&lt;br/&gt;
    or&lt;br/&gt;
    2.2 items can only be returned once&lt;/p&gt;


&lt;p&gt;skip would have no effect and sorts after the first random sort would have no effect.&lt;/p&gt;

&lt;p&gt;For example:&lt;/p&gt;

&lt;p&gt;db.animals.find().sort(&lt;/p&gt;
{&apos;sex&apos;: 1, &apos;race&apos;: random, &apos;age&apos;: 1}
&lt;p&gt;)&lt;/p&gt;

&lt;p&gt;the sort on sex would work, then the sort on race would randomize races  but age sort should be discarded or the sort could be done but if we sort many values of race, it probably would be inneficient to sort on randomized values.&lt;/p&gt;</comment>
                            <comment id="14484" author="alerner" created="Thu, 27 May 2010 16:16:25 +0000"  >&lt;p&gt;PhpMoAdmin, I&apos;m a new member of the 10Gen team. Granted, I&apos;m learning about its internals everyday. &lt;img class=&quot;emoticon&quot; src=&quot;https://jira.mongodb.org/images/icons/emoticons/smile.png&quot; height=&quot;16&quot; width=&quot;16&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt;&lt;/p&gt;

&lt;p&gt;Take the Jonh Doe query for example. The cookbook recipe portrays it as a query over the db.docs collection. &apos;author&apos; would be equivalent to &apos;key&apos; in that example and the collection would have the extra random attribute.&lt;/p&gt;

&lt;p&gt;Now, suppose you want &lt;/p&gt;
{ key : 2 }
&lt;p&gt; of that collection but just a random element of the result. Instead of opening a cursor over that search criteria, we take a draw and issue what amounts to a lookup query instead. For instance, you could have used Math.random() and asked for { key : 2, random : &lt;/p&gt;
{ $gte : &amp;lt;your random draw&amp;gt; }
&lt;p&gt;. Because the docs in that collection have a random attribute of their own, this new query now can be solved via a lookup. A caveat: there needs to be an index covering &apos;key&apos; and &apos;random&apos;. &lt;/p&gt;

&lt;p&gt;You can do an explain() on the examples yourself. &lt;img class=&quot;emoticon&quot; src=&quot;https://jira.mongodb.org/images/icons/emoticons/wink.png&quot; height=&quot;16&quot; width=&quot;16&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt;&lt;/p&gt;
</comment>
                            <comment id="14483" author="phpmoadmin" created="Thu, 27 May 2010 15:56:40 +0000"  >&lt;p&gt;From my understanding you are not partially executing the query, you are getting a count from a cursor, then moving the cursor position and then retrieving a single object. Unless establishing a cursor or using the skip function actually queries data than this should not be a time-impacting action beyond the time it takes to retrieve the single object.&lt;/p&gt;

&lt;p&gt;Perhaps someone with knowledge of Mongo internals can chime in if my perception is correct on this?&lt;/p&gt;</comment>
                            <comment id="14482" author="alerner" created="Thu, 27 May 2010 15:43:34 +0000"  >&lt;p&gt;PhpMoAdmin, taking a random draw out of the result count is always a good a possibility, too. &lt;/p&gt;

&lt;p&gt;If one could trade the extra storage space for time,  the random attribute allows for executing the query partially and still getting the desired effect.&lt;/p&gt;

</comment>
                            <comment id="14480" author="phpmoadmin" created="Thu, 27 May 2010 15:18:02 +0000"  >&lt;p&gt;Alberto, feel free to add the JS version of my previous post to your cookbook. It serves the same purpose as your cookbook&apos;s db.docs.findOne example but does not require adding any &quot;random&quot; data into the collection.&lt;/p&gt;</comment>
                            <comment id="14479" author="alerner" created="Thu, 27 May 2010 14:43:49 +0000"  >&lt;p&gt;There&apos;s a new and improved version of the cookbook recipe. For now, this functionality could be obtained with client-side &amp;#8211; efficient &amp;#8211; logic.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://cookbook.mongodb.org/patterns/random-attribute/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://cookbook.mongodb.org/patterns/random-attribute/&lt;/a&gt; &lt;/p&gt;

&lt;p&gt;Thanks Aaron, Dwight, and everybody that contributed corrections and comments.&lt;/p&gt;</comment>
                            <comment id="14446" author="phpmoadmin" created="Tue, 25 May 2010 22:54:45 +0000"  >&lt;p&gt;Just figured out a way to get a single random object (basically findOne) with a find() criteria via PHP; the same concept should be applicable in JS and other languages:&lt;/p&gt;

&lt;p&gt;$cursor = $this-&amp;gt;selectCollection(&apos;myCollection&apos;)-&amp;gt;find(array(&apos;color&apos; =&amp;gt; &apos;red&apos;));&lt;br/&gt;
$randObj = $cursor-&amp;gt;limit(1)&lt;del&gt;&amp;gt;skip(rand(0, ($cursor&lt;/del&gt;&amp;gt;count() - 1)))-&amp;gt;getNext();&lt;/p&gt;

&lt;p&gt;Can this logic be packaged up into the Mongo core for $col-&amp;gt;sort(&apos;$random&apos; =&amp;gt; true)-&amp;gt;findOne()  ?&lt;/p&gt;</comment>
                            <comment id="14432" author="phpmoadmin" created="Tue, 25 May 2010 15:30:58 +0000"  >&lt;p&gt;+1 on the option for:&lt;br/&gt;
photos.find(&lt;/p&gt;
{&quot;author&quot;:&quot;johndoe&quot;}
&lt;p&gt;).sort(&lt;/p&gt;
{&quot;$random&quot;:1}
&lt;p&gt;) &lt;br/&gt;
This seems most logical to me.&lt;/p&gt;

&lt;p&gt;Not sure how this would perform, but conceptually something like:&lt;br/&gt;
collection.skip(rand(0, collection.length - 1))&lt;br/&gt;
would work so long as rand() was re-executed for each result returned.&lt;/p&gt;

&lt;p&gt;Just a thought, PHP has a shuffle() function that randomizes the order of an array; perhaps the same internal-logic can be used on the objects within a collection or index before retrieval?&lt;/p&gt;</comment>
                            <comment id="14356" author="aaron" created="Thu, 20 May 2010 15:26:25 +0000"  >&lt;p&gt;Here&apos;s a &quot;random&quot; idea.  I believe our btree buckets are stored back to back on disk, so we can just pick one randomly (not using btree structure, just treating disk representation as an array of buckets) and then pick a random bit inside the chosen bucket.  If the bit is inside a key, we return the document for that key.  Otherwise we try again.  This works if the keys are uniform size (eg auto generated id which is common).  If they&apos;re not, we can discount the probability of returning a key by its size by doing a second probability test to determine whether or not to return the document.  If we want to return lots of random docs, we can probably work things to scan each btree bucket at most once - maybe by generating the number of elements to return per bucket using a poisson distribution if that works.  Of course we won&apos;t get the same data locality as with the prepopulated random values described in the cookbook.  Anyway, just a brainstorm.&lt;/p&gt;</comment>
                            <comment id="14331" author="alerner" created="Wed, 19 May 2010 16:00:28 +0000"  >&lt;p&gt;I have created a cookbook recipe based on Janitha&apos;s and Jared&apos;s suggestions. Please, have a look at &lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://cookbook.mongodb.org/patterns/random-attribute/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://cookbook.mongodb.org/patterns/random-attribute/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;and let me know if these techniques solve the issue.&lt;/p&gt;</comment>
                            <comment id="13112" author="jrosoff" created="Fri, 19 Mar 2010 11:47:18 +0000"  >&lt;p&gt;What if random sample was an option to a map-reduce instead of a modifier for find? This avoids the btree entirely since you&apos;re already doing a table scan and simply reduces the number of records actually fed to the map phase. &lt;/p&gt;

&lt;p&gt;For example, we have a map-reduce job that calculates statistics over a large set of docs. There&apos;s no need for us to calculate this over the whole collection, hitting just a random set of around log N of the N documents in the collection would be sufficient. However, it&apos;s much easier to write this algorithm as a map-reduce job than to pull it out of the db and then do the calculation externally. But as a map-reduce job, we only have the choices of running it on the whole collection, or on some non-random subset using a query. &lt;/p&gt;

&lt;p&gt;Would be nice if you could do something like this: &lt;/p&gt;

&lt;p&gt;db.runCommand( &lt;/p&gt;
  { mapreduce: &amp;lt;collection&amp;gt;,
    map: &amp;lt;map_function&amp;gt;,
    reduce: &amp;lt;reduce_function&amp;gt;, 
    [, sample: &amp;lt;total_number_of_random_records_to_send_to_map&amp;gt;] 
  } 

&lt;p&gt;And have mongo choose &amp;lt;sample&amp;gt; random records from the collection to send to map. Seems like this would let statistical algorithms written in map reduce to run in sublinear time.&lt;/p&gt;</comment>
                            <comment id="12475" author="colinmollenhour" created="Tue, 23 Feb 2010 12:57:51 +0000"  >&lt;p&gt;Could this be implemented as a sort order modifier akin to SQL&apos;s ORDER BY RAND()? Combined with limit you can choose 1 or X and iterating would be no different than on a sorted set. Of course it would need to only randomize records up to the limit for performance, but I don&apos;t know if this is a problem with the way cursors are implemented.&lt;/p&gt;

&lt;p&gt;photos.find(&lt;/p&gt;
{&quot;author&quot;:&quot;johndoe&quot;}
&lt;p&gt;).random().limit(5)&lt;br/&gt;
// or perhaps&lt;br/&gt;
photos.find(&lt;/p&gt;
{&quot;author&quot;:&quot;johndoe&quot;}
&lt;p&gt;).sort(&lt;/p&gt;
{&quot;$random&quot;:1}
&lt;p&gt;)&lt;/p&gt;</comment>
                            <comment id="11743" author="eliot" created="Wed, 13 Jan 2010 11:20:32 +0000"  >&lt;p&gt;Could do a random walk into the btree&lt;br/&gt;
Issue is if you want do X random rather than 1 random...&lt;br/&gt;
Will be O( X log(N) )&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10011">
                    <name>Depends</name>
                                            <outwardlinks description="depends on">
                                        <issuelink>
            <issuekey id="227058">SERVER-20121</issuekey>
        </issuelink>
                            </outwardlinks>
                                                        </issuelinktype>
                            <issuelinktype id="10010">
                    <name>Duplicate</name>
                                                                <inwardlinks description="is duplicated by">
                                        <issuelink>
            <issuekey id="264594">SERVER-22573</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                            <outwardlinks description="related to">
                                        <issuelink>
            <issuekey id="225159">CSHARP-1366</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="227214">JAVA-1937</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="213705">SERVER-19182</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="213706">SERVER-19183</issuekey>
        </issuelink>
                            </outwardlinks>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="209231">DRIVERS-234</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>62.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_18555" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname># of Sprints</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1.0</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>Wed, 13 Jan 2010 11:20:32 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        8 years, 30 weeks, 2 days ago
    
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_18254" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Dependencies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue><![CDATA[<s><a href='https://jira.mongodb.org/browse/SERVER-20121'>SERVER-20121</a></s>]]></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_10857" key="com.pyxis.greenhopper.jira:gh-epic-link">
                        <customfieldname>Epic Link</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>PM-156</customfieldvalue>
                        </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>luke.bonanomi@mongodb.com</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            8 years, 30 weeks, 2 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>aaron</customfieldvalue>
            <customfieldvalue>auny</customfieldvalue>
            <customfieldvalue>alerner</customfieldvalue>
            <customfieldvalue>tolstenko</customfieldvalue>
            <customfieldvalue>akamensky</customfieldvalue>
            <customfieldvalue>codeninja</customfieldvalue>
            <customfieldvalue>andybaird</customfieldvalue>
            <customfieldvalue>acnalesso</customfieldvalue>
            <customfieldvalue>callum@gare.com.au</customfieldvalue>
            <customfieldvalue>charlie.swanson@mongodb.com</customfieldvalue>
            <customfieldvalue>colinmollenhour</customfieldvalue>
            <customfieldvalue>hyde</customfieldvalue>
            <customfieldvalue>djames</customfieldvalue>
            <customfieldvalue>davidn</customfieldvalue>
            <customfieldvalue>dkarrenbeld</customfieldvalue>
            <customfieldvalue>alice@gothcandy.com</customfieldvalue>
            <customfieldvalue>codernumber1</customfieldvalue>
            <customfieldvalue>dimonb@gmail.com</customfieldvalue>
            <customfieldvalue>eliot</customfieldvalue>
            <customfieldvalue>engenyn</customfieldvalue>
            <customfieldvalue>terkhorn</customfieldvalue>
            <customfieldvalue>fredy.ns</customfieldvalue>
            <customfieldvalue>gbraad</customfieldvalue>
            <customfieldvalue>xgen-internal-githook</customfieldvalue>
            <customfieldvalue>octante</customfieldvalue>
            <customfieldvalue>ijinasena</customfieldvalue>
            <customfieldvalue>janitha</customfieldvalue>
            <customfieldvalue>jrosoff</customfieldvalue>
            <customfieldvalue>Jaromir Muller</customfieldvalue>
            <customfieldvalue>jjudge</customfieldvalue>
            <customfieldvalue>Jeroenooms</customfieldvalue>
            <customfieldvalue>sktayloriii</customfieldvalue>
            <customfieldvalue>lacker</customfieldvalue>
            <customfieldvalue>leopd</customfieldvalue>
            <customfieldvalue>llacroix</customfieldvalue>
            <customfieldvalue>elvar</customfieldvalue>
            <customfieldvalue>m.korbakov@nimble.com</customfieldvalue>
            <customfieldvalue>phpmoadmin</customfieldvalue>
            <customfieldvalue>rwillmer</customfieldvalue>
            <customfieldvalue>rgpublic</customfieldvalue>
            <customfieldvalue>jrschumacher</customfieldvalue>
            <customfieldvalue>tomlor</customfieldvalue>
            <customfieldvalue>tlaunay</customfieldvalue>
            <customfieldvalue>victorhooi@yahoo.com</customfieldvalue>
            <customfieldvalue>shalmanese</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hrpt33:</customfieldvalue>

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

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10558" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>6295</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_10557" key="com.pyxis.greenhopper.jira:gh-sprint">
                        <customfieldname>Sprint</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue id="572">Quint Iteration 6</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_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|hrj6ef:</customfieldvalue>

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