Return-Path: Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: (qmail 54185 invoked from network); 2 Mar 2010 11:26:51 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 2 Mar 2010 11:26:51 -0000 Received: (qmail 43267 invoked by uid 500); 2 Mar 2010 11:26:46 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 43235 invoked by uid 500); 2 Mar 2010 11:26:46 -0000 Mailing-List: contact user-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@couchdb.apache.org Delivered-To: mailing list user@couchdb.apache.org Received: (qmail 43227 invoked by uid 99); 2 Mar 2010 11:26:46 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 02 Mar 2010 11:26:46 +0000 X-ASF-Spam-Status: No, hits=2.2 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of srikrishnamohan@gmail.com designates 74.125.83.180 as permitted sender) Received: from [74.125.83.180] (HELO mail-pv0-f180.google.com) (74.125.83.180) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 02 Mar 2010 11:26:39 +0000 Received: by pvc22 with SMTP id 22so38577pvc.11 for ; Tue, 02 Mar 2010 03:26:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:content-type; bh=IJ3a7dZA0ormBuo8nfbmEh3Auv0gTW2mGj2Q/cysQPw=; b=ecSWSIzrBH8XASzgTPz4szyXLRjMR+sX+Aq+omlFg3nKWC/QVW7NAwkcC7TOnUINdC h6QfaRJO0PIYDYodnrPh6tuufhZCZYN1CPwK00lUrUDT/I6NrZ0zU4kOA2PuzOZ3W1Xz B/InusNLH6eqtUyEQfp3dHQ2fL9Eg3+kT0s60= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=RUj8RDDa9WGC8aVOYyWda5WYSkeFVh38xHmnKzdkvsSfoV6QEXRWd2fXUApTT+bW0b mjxB2t8XzWnInKcsv0onjh+qTD6GbeaT6BTdjrQzf/tntNf4NDxVkzb2xI4YaFgvh/ux vric7sx7lSNSI49wdvtOgIZBFEGr7XPpDurDA= MIME-Version: 1.0 Received: by 10.140.251.11 with SMTP id y11mr3320300rvh.96.1267529177467; Tue, 02 Mar 2010 03:26:17 -0800 (PST) Date: Tue, 2 Mar 2010 20:26:17 +0900 Message-ID: Subject: couchdb views POST keys From: km To: user@couchdb.apache.org Content-Type: multipart/alternative; boundary=000e0cd112ba5d8b500480cfa243 X-Virus-Checked: Checked by ClamAV on apache.org --000e0cd112ba5d8b500480cfa243 Content-Type: text/plain; charset=ISO-8859-1 Hi all, I am using couchdb 0.10.0. I would like to fetch documents from a view by posting it a list of doc ids. so I have these doc ids ##### javascript ########## doc_ids = ['45631c12752bfdd3ee5c6934d633863a', "aefe0494ba7563d09f1412e8bfb279f4","f82085c42ccd962a257ab31003c481e9",...] doc_ids = JSON.stringify(doc_ids); //using jquery to post the key list to the url $.post('/mydb/_design/query/_view/getbyid', {keys:doc_ids},function(data){ alert(data) } ); # ### javascript ############ ####### view ########## my view "_view/getbyid" is function(doc){ if(doc.type=='bond') { emit(doc._id, {name:doc.name, date:doc.date); } } ########## view ########### But i get this error! {"error":"bad_request","reason":"invalid UTF-8 JSON"} I checked the JSON data submitted to the url with firebug ie ., doc_ids and firebug json tab shows thesubmitted json data is : keys=%5B%22e5f9a1f0cb2faf5d19a05a0abce5c3ea%22%2C%22a03f0f22d0b716f73ca45721f33d6a8b%22%2C%2252658bee262eb30ae3065b14d7170d76 %22%2C%2245631c12752bfdd3ee5c6934d633863a%22%2C%22aefe0494ba7563d09f1412e8bfb279f4%22%2C%223ba451f333e692ecb0eed2d71e386c5f %22%2C%22a8297a61415a8246db4fa7a488699d48%22%2C%222a3a4b2d923d36af3ff99425caf68c5c%22%2C%2287bf38d5ffd160071e981ed41bb7104f %22%2C%22d1bd9bf875f815e515e78dcf3937848f%22%2C%220b42be1905cb3cb46f2f9a872442cf9b%22%2C%22f82085c42ccd962a257ab31003c481e9 %22%2C Now is it that the encoding causing the problem ? how do i mitigate ? regards, Krishna --000e0cd112ba5d8b500480cfa243--