Re: 404 response after updating document in futon

2013-08-26 Thread Mark Hahn
I don't know if this is related, but I see out-of-date results in futon all the time. I've gotten in the habit of hitting refresh twice instead of once. There must be some kind of cache. On Mon, Aug 26, 2013 at 3:06 PM, Jens Alfke wrote: > > On Aug 26, 2013, at 1:26 AM, Cameron Jacobson > wro

Re: 404 response after updating document in futon

2013-08-26 Thread Jens Alfke
On Aug 26, 2013, at 1:26 AM, Cameron Jacobson wrote: > I update a document in Futon, then immediately following that update, I > update that document via the _bulk_docs HTTP API call. > > When I do this, the server response is "404 Object Not Found", but when > I refresh Futon, I see that the d

Re: CouchDB crashing at random times

2013-08-26 Thread Chung, Yang
Hi Dave, Your suggestion certainly worked. I changed the 'delayed_commits' to false in the config, and I didn't see the crash (and subsequent connection refused error). What are the implications of setting 'delayed_commits' to false? Or better yet, what does setting 'delayed_commits' to true and

View specs using jasmine and node

2013-08-26 Thread nicholas a. evans
I've strung together Jasmine, webmake (npm package), and the source files for my views to make a spec suite that can be run in my browser. It's getting the job done and helped me identify some bugs and develop some new views, but I'm not particularly happy with it. It requires annoying hacks in m

Re: Strange Reduce Value

2013-08-26 Thread Ido Ran
That is not enough because it will not tell me how many items I have. I think I didn't take rereduce into account. When I change the reduce method to take rereduce into account it is now working great. function (key, values, rereduce) { var r = { yes:0, no: 0, count: 0 }; for (var i = 0; i < val

Re: Strange Reduce Value

2013-08-26 Thread Robert Newson
Sure, you're not accumulating your count value, you just overwrite it with the length of the latest values array. I suggest this instead; map: function(doc) { if (doc.$type === 'employee') { emit(doc.surveyID, [doc.answer, 1]); } } reduce:: "_sum" The answer will be an array where the

Strange Reduce Value

2013-08-26 Thread Ido Ran
Hi. I have CouchDB with documents that contain possible answers to survey. All the possible answer documents have shared SurveyID field and either have *answer* field or they do not. I have this map function: function(doc) { if (doc.$type === 'employee') { var val =

my apologies

2013-08-26 Thread Cameron Jacobson
Sorry for the previous post. I hadn't isolated my test as I thought I had. Once I was isolated, I recognized it's likely a different issue. Will re-post if there's anything to it.

404 response after updating document in futon

2013-08-26 Thread Cameron Jacobson
I encountered an issue while running 1.3.0. Just to be safe, I upgraded to 1.3.1, and am still encountering the issue. I update a document in Futon, then immediately following that update, I update that document via the _bulk_docs HTTP API call. When I do this, the server response is "404 Object