couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ramanadham, Radhika" <>
Subject RE: running views return nothing with couchdb1.5.1
Date Wed, 21 May 2014 15:40:41 GMT
I get "True" when I run GET /_config/query_server_config/reduce_limit  for both- couchdb server
1.5.0 and 1.5.1.

Also, I just have a very simple design doc with 2 views. Even this doesn’t work on couchdb
1.5.1 and works ok on cocuchdb 1.5.0

def createDesignDocForErrors():
    design ='errors')
    resp = design.put(params={
        "language": "javascript",
            "by_test_id": {
                #"map": "function(doc) { if (doc.type == 'error')  emit(doc.test_id, doc.errors)
                "map": "function(doc) { if (doc.type == 'error')  emit(doc.test_id, doc.error_count)
                "reduce" : "_sum"

            "by_testid_starttime": {
                "map": "function(doc) { if (doc.type == 'error')  emit([doc.test_id,doc.start_time],
doc.error_count) }",
                "reduce" : "function(keys, values) {return (values[0])}"

I can't run this view either. Says, problem accessing a view.

-----Original Message-----
From: Dave Cottlehuber [] 
Sent: Wednesday, May 21, 2014 11:34 AM
Subject: Re: running views return nothing with couchdb1.5.1

> Hi Radhika,
> What does the server status say in futon? (i.e. does it note that the 
> views are building or not?)
> One side comment, the reduce functions that you posted will likely not 
> do what you expect when a rereduce is run. I would suggest using 
> _stats (preferable solution, 
> educe-functions
> ).
> Cheers,
> Mike

As Mike pointed out, you will see noticeably better performance using the builtin function.

Do you see any errors, in particular Reduce output must shrink more rapidly or reduce_overflow_error

It’s possible you have a different config on each box, for the reduce heuristic;  

GET /_config/query_server_config/reduce_limit is what you would be looking to compare between
the boxes.

Thanks Bob & Alex for reminding me of the error messages!


View raw message