CouchDB 减少 Futon 中的复选框
我在 CouchDB 中创建了一个小型测试数据库,并在 Futon 中创建了一个临时视图。我编写了映射器和减速器。映射器可以工作,但减速器的复选框永远不会显示。我知道应该有一个复选框,因为我在使用更大的数据库上的视图时看到过它。
为什么减速器复选框不存在?这是正常行为吗?减速器复选框有时不出现吗?也许是因为我的结果集很小或者由于某种原因无法减少? (尽管我看不出为什么我不能减少我的结果)
我的映射器是这样的。我添加了 [1, 2, 3].forEach
东西只是因为我认为我需要使结果集更大才能获得减少复选框。
function(doc) {
[1, 2, 3].forEach(function() {
emit(doc.name, 1);
});
}
减速机是这样的。
function(keys, values, rereduce) {
return sum(values);
}
结果如下:
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:
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
刷新页面就会显示出来。
这是一个已知错误: https://issues.apache.org/jira/browse/COUCHDB -1778
Refresh the page and it will show up.
It is a known bug: https://issues.apache.org/jira/browse/COUCHDB-1778