From raison at chatsubo.net Wed Aug 24 00:12:49 2011 From: raison at chatsubo.net (Kevin Raison) Date: Tue, 23 Aug 2011 17:12:49 -0700 Subject: [clouchdb-devel] ad-hoc view problem Message-ID: <4E544201.7040408@chatsubo.net> I am just getting started with clouchdb and have hit a snag; I cannot seem to get ad-hoc views to work properly. With a function definition like so (or the equivalent in parenscript): (ad-hoc-view "function(doc) { if (doc.TYPE == 'snippet') { map(null,doc.SNIPPET) } }") I get an error: ((:|error| . "bad_request") (:|reason| . "invalid UTF-8 JSON")) And I see this in the couchdb logs: [error] [<0.16308.73>] attempted upload of invalid JSON function(doc) { if (doc.TYPE == 'snippet') { map(null,doc.SNIPPET) } } I am using couchdb version 0.10.0. Is this a known issue? Any suggestions? Thanks, Kevin From peter.eddy at gmail.com Fri Aug 26 22:32:27 2011 From: peter.eddy at gmail.com (Peter Eddy) Date: Fri, 26 Aug 2011 18:32:27 -0400 Subject: [clouchdb-devel] ad-hoc view problem In-Reply-To: <4E544201.7040408@chatsubo.net> References: <4E544201.7040408@chatsubo.net> Message-ID: Hi, That version of couchdb is a little old by now. Almost every release of couchdb has broken my clouchdb library, which made it difficult to maintain and almost impossible to support many different versions. I'll see if I can find a 0.10.x version of couchdb and see if I can tell what's going wrong. I should warn you that my current employer claims all rights to any work I do, even if I do that work in my spare time. This is obviously incompatible with the licence to clouchdb, so I've reluctantly had to to stop working on it until I find a better employer. - Peter On Tue, Aug 23, 2011 at 8:12 PM, Kevin Raison wrote: > I am just getting started with clouchdb and have hit a snag; ?I cannot seem > to get ad-hoc views to work properly. ?With a function definition like so > (or the equivalent in parenscript): > > (ad-hoc-view "function(doc) { if (doc.TYPE == 'snippet') { > map(null,doc.SNIPPET) } }") > > I get an error: > ((:|error| . "bad_request") (:|reason| . "invalid UTF-8 JSON")) > > And I see this in the couchdb logs: > ?[error] [<0.16308.73>] attempted upload of invalid JSON function(doc) { if > (doc.TYPE == 'snippet') { map(null,doc.SNIPPET) } } > > I am using couchdb version 0.10.0. ?Is this a known issue? ?Any suggestions? > > Thanks, > Kevin > > _______________________________________________ > clouchdb-devel mailing list > clouchdb-devel at common-lisp.net > http://lists.common-lisp.net/cgi-bin/mailman/listinfo/clouchdb-devel >