Message from discussion
"there were emits but no data" when jsMode set to true
Received: by 10.50.202.5 with SMTP id ke5mr1441616igc.3.1337271955308;
Thu, 17 May 2012 09:25:55 -0700 (PDT)
X-BeenThere: mongodb-user@googlegroups.com
Received: by 10.50.181.135 with SMTP id dw7ls5175711igc.0.canary; Thu, 17 May
2012 09:25:36 -0700 (PDT)
Received: by 10.50.189.195 with SMTP id gk3mr235971igc.1.1337271936705;
Thu, 17 May 2012 09:25:36 -0700 (PDT)
Received: by 10.50.100.229 with SMTP id fb5msigb;
Thu, 17 May 2012 09:19:20 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.68.222.38 with SMTP id qj6mr1388404pbc.6.1337271560136; Thu,
17 May 2012 09:19:20 -0700 (PDT)
Authentication-Results: ls.google.com; spf=pass (google.com: domain of
p...@mccallick.com designates internal as permitted sender)
smtp.mail=p...@mccallick.com; dkim=pass
header...@mccallick.com
Received: by vi6g2000pbc.googlegroups.com with HTTP; Thu, 17 May 2012 09:19:20
-0700 (PDT)
Date: Thu, 17 May 2012 09:19:20 -0700 (PDT)
User-Agent: G2/1.0
X-HTTP-UserAgent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.19
(KHTML, like Gecko) Chrome/18.0.1025.168 Safari/535.19,gzip(gfe)
Message-ID: <a4843924-8140-4981-9ef4-53e6963bf081@vi6g2000pbc.googlegroups.com>
Subject: "there were emits but no data" when jsMode set to true
From: Paul McCallick <p...@mccallick.com>
To: mongodb-user <mongodb-user@googlegroups.com>
Content-Type: text/plain; charset=ISO-8859-1
I'm getting the "there were emits but no data!" error message when
trying to do a simple map reduce. It works when I jsmode is false,
but not when jsmode is true.
I've looked that mongo code a bit and can't figure out what's wrong.
It looks like this error is triggered when "output" is 0. It also
looks like "output" should be getting set to _keyCt. I can verify
that _keyCt is not 0 by returning it my results, but here's what I get
from mongo:
counts" : { "input" : 28, "emit" : 76150, "reduce" : 3221, "output" :
0 }
map = "function() {emit(this.SecurityId,
{securityId:this.SecurityId,keycount:_keyCt});}";
reduce = "function(key,values){return values[0];}";