Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

CouchDB Reduce Check Box in Futon

Tags:

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 reducer is this.

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

The results look like this: enter image description here

like image 346
Jason Marcell Avatar asked May 16 '11 03:05

Jason Marcell


1 Answers

Refresh the page and it will show up.

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

like image 193
Marcello Nuccio Avatar answered Nov 12 '22 04:11

Marcello Nuccio