<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Wed Feb 07 21:39:57 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>[CSHARP-1553] Returned value is partial by using map/reduce command</title>
                <link>https://jira.mongodb.org/browse/CSHARP-1553</link>
                <project id="10041" key="CSHARP">C# Driver</project>
                    <description>&lt;p&gt;I get partial data from mongodb by using map/reduce api as well as by running the command in client tool. The command is like as below.&lt;br/&gt;
var m = function ()&lt;br/&gt;
{&lt;br/&gt;
    emit(this.FundCode, &lt;/p&gt;
{
         count : 1,itemCollection:[],
         CustomerNo  :  this.CustomerNo,   
	 FundCode  :  this.FundCode ,   
	 NaturalDate  : this.NaturalDate,   
	 ShareVal  : this.ShareVal,   
	 CostValue  : this.CostValue,   
	 CurUnpaidValue  : this.CurUnpaidValue,   
	 UnpaidValue  : this.UnpaidValue,   
	 ProfitValue  : this.ProfitValue,   
	 ProfitValue2  : this.ProfitValue2,   
	 FloatProfitRate  : this.FloatProfitRate,   
	 UpdateTime  : this.UpdateTime  }
&lt;p&gt;);&lt;br/&gt;
}; &lt;br/&gt;
var r = function (key, emits)&lt;br/&gt;
{&lt;br/&gt;
    var total =0;var items =[]; &lt;/p&gt;

&lt;p&gt;    for (var i in emits) &lt;br/&gt;
    {   &lt;br/&gt;
         total += emits&lt;span class=&quot;error&quot;&gt;&amp;#91;i&amp;#93;&lt;/span&gt;.count;      &lt;br/&gt;
	     items.push(&lt;/p&gt;
{UnpaidValue : emits[i].UnpaidValue}
&lt;p&gt;);&lt;br/&gt;
    }   &lt;/p&gt;

&lt;p&gt;    return &lt;/p&gt;
{count : total, itemCollection: items }
&lt;p&gt;;    &lt;br/&gt;
};&lt;/p&gt;

&lt;p&gt;db.runCommand(&lt;br/&gt;
{ &quot;mapreduce&quot; : &quot;ProfitEntity&quot;, &lt;br/&gt;
  &quot;map&quot; : m,&lt;br/&gt;
  &quot;reduce&quot;: r,&lt;br/&gt;
  &quot;out&quot; : &lt;/p&gt;
{ &quot;inline&quot; : 1 }
&lt;p&gt;})&lt;/p&gt;

&lt;p&gt;In theory, &quot;count&quot; equals the length of itemCollection. But it doesn&apos;t. The length of itemCollection is less. It is very strange. I have tested it by small data. The result is right. But by using big data it is wrong. &lt;/p&gt;</description>
                <environment>Os: windows7; The server version of mongodb is 3.0</environment>
        <key id="262449">CSHARP-1553</key>
            <summary>Returned value is partial by using map/reduce command</summary>
                <type id="3" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14718&amp;avatarType=issuetype">Task</type>
                                            <priority id="2" iconUrl="https://jira.mongodb.org/images/icons/priorities/critical.svg">Critical - P2</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="-1">Unassigned</assignee>
                                    <reporter username="Steve">Steven.Zhou [X]</reporter>
                        <labels>
                            <label>question</label>
                    </labels>
                <created>Tue, 2 Feb 2016 07:18:59 +0000</created>
                <updated>Fri, 5 Apr 2019 13:58:04 +0000</updated>
                            <resolved>Tue, 2 Feb 2016 10:06:58 +0000</resolved>
                                    <version>1.7.1</version>
                                                    <component>API</component>
                                        <votes>0</votes>
                                    <watches>1</watches>
                                                                                                                <comments>
                            <comment id="1160689" author="craiggwilson" created="Tue, 2 Feb 2016 10:06:51 +0000"  >&lt;p&gt;Hi Steven,&lt;/p&gt;

&lt;p&gt;We generally reserve tickets in Jira for bug reports or feature requests. A better place to ask questions is in our &lt;a href=&quot;https://groups.google.com/forum/?pli=1#!forum/mongodb-user&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;user group&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;As this question also doesn&apos;t seem to pertain to the .NET driver at all, I&apos;m going to close this ticket.&lt;/p&gt;

&lt;p&gt;Craig&lt;/p&gt;</comment>
                            <comment id="1160646" author="steve" created="Tue, 2 Feb 2016 08:26:21 +0000"  >&lt;p&gt;When I do some debug, I found that the one element of emits &apos;s &quot;count&quot; is bigger that &quot;1&quot;. When mongodb is doing mapping, it also do reduce to combine the data? &lt;/p&gt;</comment>
                            <comment id="1160636" author="steve" created="Tue, 2 Feb 2016 07:56:26 +0000"  >&lt;p&gt;It looks like that before reducing, partial data has already been combined by mongodb? Whether mongodb has this feature?&lt;/p&gt;</comment>
                    </comments>
                    <attachments>
                            <attachment id="107247" name="screenshot-1.png" size="272060" author="Steve" created="Tue, 2 Feb 2016 07:25:33 +0000"/>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_15850" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hshyon:</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>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            </customfields>
    </item>
</channel>
</rss>