Return-Path: X-Original-To: apmail-couchdb-dev-archive@www.apache.org Delivered-To: apmail-couchdb-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id B15B810671 for ; Mon, 12 Aug 2013 17:24:24 +0000 (UTC) Received: (qmail 56462 invoked by uid 500); 12 Aug 2013 17:24:24 -0000 Delivered-To: apmail-couchdb-dev-archive@couchdb.apache.org Received: (qmail 56423 invoked by uid 500); 12 Aug 2013 17:24:23 -0000 Mailing-List: contact dev-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@couchdb.apache.org Delivered-To: mailing list dev@couchdb.apache.org Received: (qmail 56415 invoked by uid 99); 12 Aug 2013 17:24:23 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 12 Aug 2013 17:24:23 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW X-Spam-Check-By: apache.org Received-SPF: error (nike.apache.org: local policy) Received: from [209.85.215.174] (HELO mail-ea0-f174.google.com) (209.85.215.174) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 12 Aug 2013 17:24:18 +0000 Received: by mail-ea0-f174.google.com with SMTP id z15so3520339ead.19 for ; Mon, 12 Aug 2013 10:23:38 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-gm-message-state:content-type:mime-version:subject:from :in-reply-to:date:content-transfer-encoding:message-id:references:to; bh=sKTDZn3Xs//fUwXRCeXwUD2QrE/HzL7GsVhPCIa1giY=; b=a2AwAe4B7C3L7lnlrZkhIB79EZfl1P9YBIhW6gRkZKvW25jFFcmi9nm/R0/AEeJ0ku qaRgE8yv5jPRqhwqjVBM2Uvj43LfIIFvBPst78q9n61lUvCEAmGfGtDzyNEcNaKy68aQ zzEc27nqv/nhGUzHSJegoj6/zB1OW55FXRLnO4SkYSING2N9ujSRzI7u/wX+Z/oydl4R kqb/TVQYa6wugF1i4TFtARyLzV4wwTMhWjCgKjQ/S7hj2fiIuBc2Voa6+3IZGda/wiZT MLet+Qbr/xbdeVZmbBu3/hWvMObJLu+h1DyUTQFTgTJ0uJsrXD36w9hnveLJyW0jG0to jX5Q== X-Gm-Message-State: ALoCoQm1wdFH2KMs5cRY45Unha3zScH0qebBkOkg4AMwR+NL9wlzDOOgy7zUzutCmXmt0Cu2Sk7/ X-Received: by 10.14.108.194 with SMTP id q42mr117738eeg.113.1376328217589; Mon, 12 Aug 2013 10:23:37 -0700 (PDT) Received: from [192.168.2.112] ([77.72.35.178]) by mx.google.com with ESMTPSA id f49sm53304544eec.7.2013.08.12.10.23.35 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 12 Aug 2013 10:23:36 -0700 (PDT) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Apple Message framework v1283) Subject: Re: [jira] [Commented] (COUCHDB-1868) Using multiple keys, the _all_docs built-in view acts differently then a user defined view From: Filippo Fadda In-Reply-To: Date: Mon, 12 Aug 2013 19:23:33 +0200 Content-Transfer-Encoding: quoted-printable Message-Id: <3281206B-B7A4-4299-AC92-B56E6FD7C401@programmazione.it> References: To: dev@couchdb.apache.org X-Mailer: Apple Mail (2.1283) X-Virus-Checked: Checked by ClamAV on apache.org Sorry for the mess guys, I saw formatting issues so I posted using = pastebin and I deleted the comment, adding a new one. -Filippo On Aug 12, 2013, at 7:20 PM, Filippo Fadda (JIRA) wrote: >=20 > [ = https://issues.apache.org/jira/browse/COUCHDB-1868?page=3Dcom.atlassian.ji= ra.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D137370= 63#comment-13737063 ]=20 >=20 > Filippo Fadda commented on COUCHDB-1868: > ---------------------------------------- >=20 > Please look here: http://pastebin.com/rhQ5LVCW >=20 >> Using multiple keys, the _all_docs built-in view acts differently = then a user defined view >> = --------------------------------------------------------------------------= ---------------- >>=20 >> Key: COUCHDB-1868 >> URL: = https://issues.apache.org/jira/browse/COUCHDB-1868 >> Project: CouchDB >> Issue Type: Bug >> Components: View Server Support >> Reporter: Filippo Fadda >>=20 >> When you query a view using multiple keys, the _all_docs built-in = view acts differently then a user defined view: >> 1) in the first case CouchDB returns "not_found" for every not found = key; >> 2) querying a user defined view produces, instead, an empty array. >> In the first case you obtain error=3D"not_found" for every key, when = you query a user defined view you simply don't get any rows, just the = total rows for the view. >> See: http://pastebin.com/D7NExJrd >> Now, regarding 'keys' the documentation says something like: "Used to = retrieve just the view rows matching that set of keys. Rows are returned = in the order of the specified keys." >> In a normal case, CouchDB should return just a row for each matched = key, but it will really help, having an option to return a row for every = key, even there if not found, because it's more easy, cycle through = results. >> Let's suppose the application I'm doing gets the last 30 blog posts, = displaying for each one, information that are stored into related = documents. The application will query, using as keys the posts' = identifiers, other views to get, for example, if a post has been starred = from the current logged-in user, etc. >> If a view always returns a number of rows equals to the number of = keys, the application can cycle from 0 to 29 and display all the related = information for a post. >=20 > -- > This message is automatically generated by JIRA. > If you think it was sent incorrectly, please contact your JIRA = administrators > For more information on JIRA, see: = http://www.atlassian.com/software/jira