Couchdb-是否可以停用reduce_overflow_error错误 [英] Couchdb - Is it possible to deactivate the reduce_overflow_error error

查看:85
本文介绍了Couchdb-是否可以停用reduce_overflow_error错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在处理的map/reduce不能完全返回在rereduce情况下所期望的结果.

I am working on a map/reduce that doesn't return exactly what I am expecting in rereduce cases.

我想调试它,但至少我也想看看它里面有什么,所以我输出了很多东西,每次运行该视图时,Couch都会返回一个reduce_overflow_error.

I'd like to debug it but I at least want too see what's in it, so I output a lot of things and Couch returns with a reduce_overflow_error each time I run the view.

是否可以停用此行为?

我知道这里是为了防止开发人员发表不健康的观点,但是如果我想做废话,我是否应该被允许这样做?尤其是在调试时.

I know this is here to prevent developers doing unhealthy views, but if I want to do crap, shouldn't I be allowed to? Especially when debugging.

推荐答案

您需要修改CouchDB配置以禁用此限制.

You need to modify CouchDB config to disable this restriction.

通过卷曲的第一种方式:

First way via curl:

curl -X PUT http://localhost:5984/_config/query_server_config/reduce_limit -d '"false"' -H "Content-Type: application/json"

第二个是通过local.ini配置修改的.只需如下所示添加或修改部分,然后重新启动CouchDB服务:

Second is via local.ini config modification. Just add or modify section as shown below and restart CouchDB service:

[query_server_config]
reduce_limit = false

第三是通过"Futon配置"页面.我想,您已经猜到了应该在此处修改哪些参数(;

Third one is through Futon Configuration page. I suppose, you'd already guessed what parameter should be modified there(;

但是在大​​多数情况下,此限制是合理的,因为reduce函数应该 reduce 输出,而不是增大输出-这就是map函数的作用.出于调试的原因,最好启用调试日志-它们确实很详细,并且可能显示map/reduce/任何函数输出.

But is most cases this restriction is reasonable since reduce function should reduce output, not make it bigger - that's map function work. For debugging reasons better to enable debug logs - they are really detailed and may show map/reduce/any function output.

这篇关于Couchdb-是否可以停用reduce_overflow_error错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆