Return-Path: X-Original-To: apmail-couchdb-user-archive@www.apache.org Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 7DD1DB091 for ; Wed, 18 Jan 2012 10:46:27 +0000 (UTC) Received: (qmail 4378 invoked by uid 500); 18 Jan 2012 10:46:25 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 4275 invoked by uid 500); 18 Jan 2012 10:46:24 -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 4267 invoked by uid 99); 18 Jan 2012 10:46:24 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 18 Jan 2012 10:46:24 +0000 X-ASF-Spam-Status: No, hits=3.6 required=5.0 tests=FREEMAIL_REPLY,FROM_LOCAL_NOVOWEL,HK_RANDOM_ENVFROM,HTML_MESSAGE,NORMAL_HTTP_TO_IP,RCVD_IN_DNSWL_LOW,SPF_PASS,WEIRD_PORT X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of cgsmcmlxxv@gmail.com designates 209.85.216.180 as permitted sender) Received: from [209.85.216.180] (HELO mail-qy0-f180.google.com) (209.85.216.180) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 18 Jan 2012 10:46:17 +0000 Received: by qcsp15 with SMTP id p15so2820002qcs.11 for ; Wed, 18 Jan 2012 02:45:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=z6fB31fUWA5qvnEMfa3MFq7A/D/krdWZXiALhsg4kDQ=; b=pu8+mvJsJYPUiGV/sCecpxTn0FLtIVWt/DqjlLPA10FbN66kd6jx4meAGE1J+SaigI qNDjY1nP/0VGVLXknIy5OnBGW+mMaqdC2S/tITgdlFH0sMOQ+rtkD78wlH8z7IsqEmBc SEcnn+u4HVmTRtVJbzfSpBwHaGYciJxzk03gY= MIME-Version: 1.0 Received: by 10.229.105.195 with SMTP id u3mr8180834qco.118.1326883556426; Wed, 18 Jan 2012 02:45:56 -0800 (PST) Received: by 10.229.76.202 with HTTP; Wed, 18 Jan 2012 02:45:56 -0800 (PST) In-Reply-To: References: Date: Wed, 18 Jan 2012 11:45:56 +0100 Message-ID: Subject: Re: get view with a list of keys From: CGS To: user@couchdb.apache.org Content-Type: multipart/alternative; boundary=002354470f640a05f704b6cb27ff X-Virus-Checked: Checked by ClamAV on apache.org --002354470f640a05f704b6cb27ff Content-Type: text/plain; charset=ISO-8859-1 The problem with POST method is that you need to do the encoding manually, while with GET method instead of &key=["key1",...], you get &key[]=["key1"]&key[]=... To solve the problem, for example, I transform the full query in a string and I attach it manually to the web address. In that way, the browser takes care of encoding for me and I avoid the mess. I use this method under jQuery AJAX (don't forget to add \" for the double quota required in the query). Hope it will help. CGS On Wed, Jan 18, 2012 at 11:29 AM, Marcello Nuccio wrote: > Yes, but you need to do a POST, not a GET: > > http://wiki.apache.org/couchdb/HTTP_view_API#Querying_Options > > put the following JSON in the body: > {"keys": ["key1", "key2", ...]} > > Marcello > > 2012/1/18 Alexandre Masselot : > > Hello, > > > > I'm using view with a simple map that extract a couple of values (we > store > > millions of web page info in couchdb and I need to access rapidly a md5 > > field to know whether we should treat a crawled page or if we already > know > > it). > > > > It's fine to get the view output for one page > > http://127.0.0.1:5984/honbot/_design/projections/_view/md5?key= > > "http%253A%252F%252Fwww.gesunde-maenner.ch%252Fhtml%252F" > > > > > > For saving, we use bulk_docs to save doc per 1000 slices and that goes > much > > faster. > > > > My question is: is it possible to make a view request list above, but > with > > a list of key? > > Let's say > > "http%253A%252F%252Fwww.gesunde-maenner.ch%252Fhtml%252F" > > and "http%253A%252F%252Fwww.pipo.com" > > > > > > thanks for the help > > alex > > -- > > Alexandre Masselot > > > > http://alexandre-masselot.blogspot.com/ > --002354470f640a05f704b6cb27ff--