Reputation: 1131
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.
Upvotes: 4
Views: 1627
Reputation: 4679
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.
Upvotes: 10