CouchDB Reduce Check Box in Futon
Asked Answered
O

1

20

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

Oakland answered 16/5, 2011 at 3:29 Comment(0)
S
28

Refresh the page and it will show up.

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

Simas answered 16/5, 2011 at 7:7 Comment(5)
Yeah. That worked. But why on earth is that the functionality?Oakland
It is a bug. I do not know if it is known. I will check when I will have time... but do not hesitate to report it if you can :)Simas
Bug still present for me in v1.0.1Shad
Bug still present in 1.3.0. See issues.apache.org/jira/browse/COUCHDB-1778Almira
Still an issue with 1.6.1-1.Polyzoarium

© 2022 - 2024 — McMap. All rights reserved.