I am working on a map/reduce that doesn't return exactly what I am expecting in rereduce cases.
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.
Is it possible to deactivate this behavior?
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.
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"
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
Third one is through Futon Configuration page. I suppose, you'd already guessed what parameter should be modified there(;
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With