开发者

CouchDB Reduce Check Box in Futon

开发者 https://www.devze.com 2023-03-05 22:44 出处:网络
I created a small test database in CouchDB and I\'m creating a temporary view in Futon. I wrote the mapper and the reducer. The mapper works, but the check box for the reducer never shows up. I know t

I created a small test database in CouchDB and I'm creating a temporary view in Futon. I wrote the mapper and the reducer. The mapper works, but the check box for the reducer never shows up. I know that there should be a check box because I've seen it when playing with views on a larger database I have.

Why is the reducer check box not present? Is this normal behavior? Does the reducer check box sometimes not appear? Maybe it's because my result set is small or can't be reduced for some reason? (though I see no reason why I shouldn't be able to reduce the results I have)

My mapper is this. I added the [1, 2, 3].forEach thing just because I thought I needed to make the result set larger in order to get the reduce check box.

function(doc) {
  [1, 2, 3].forEach(function() {
    emit(doc.name, 1);
  });
}

The re开发者_开发百科ducer is this.

function(keys, values, rereduce) {
  return sum(values);
}

The results look like this:

CouchDB Reduce Check Box in Futon


Refresh the page and it will show up.

It is a known bug: https://issues.apache.org/jira/browse/COUCHDB-1778

0

精彩评论

暂无评论...
验证码 换一张
取 消