From commits-return-2880-apmail-couchdb-commits-archive=couchdb.apache.org@couchdb.apache.org Wed Aug 05 17:39:22 2009 Return-Path: Delivered-To: apmail-couchdb-commits-archive@www.apache.org Received: (qmail 27513 invoked from network); 5 Aug 2009 17:39:21 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 5 Aug 2009 17:39:21 -0000 Received: (qmail 60100 invoked by uid 500); 5 Aug 2009 17:38:18 -0000 Delivered-To: apmail-couchdb-commits-archive@couchdb.apache.org Received: (qmail 59847 invoked by uid 500); 5 Aug 2009 17:38:17 -0000 Mailing-List: contact commits-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 commits@couchdb.apache.org Received: (qmail 59315 invoked by uid 500); 5 Aug 2009 17:38:16 -0000 Delivered-To: apmail-incubator-couchdb-commits@incubator.apache.org Received: (qmail 58861 invoked by uid 99); 5 Aug 2009 17:37:15 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 05 Aug 2009 17:37:15 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.130] (HELO eos.apache.org) (140.211.11.130) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 05 Aug 2009 17:37:12 +0000 Received: from eos.apache.org (localhost [127.0.0.1]) by eos.apache.org (Postfix) with ESMTP id 19C0D118C0 for ; Wed, 5 Aug 2009 17:36:51 +0000 (GMT) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Apache Wiki To: couchdb-commits@incubator.apache.org Date: Wed, 05 Aug 2009 17:36:50 -0000 Message-ID: <20090805173650.16061.44389@eos.apache.org> Subject: [Couchdb Wiki] Update of "HTTP view API" by PaulDavis X-Virus-Checked: Checked by ClamAV on apache.org Dear Wiki user, You have subscribed to a wiki page or wiki category on "Couchdb Wiki" for change notification. The following page has been changed by PaulDavis: http://wiki.apache.org/couchdb/HTTP_view_API The comment on the change is: Grammar fix to reduce startkey_docid confusion. ------------------------------------------------------------------------------ If you specify ''?limit=0'' you don't get any data, but all meta-data for this View. The number of documents in this View for example. - The ''skip'' option should only be used with small values, as skipping a large range of documents this way is inefficient (it scans the index from the startkey and then skips N elements, but still needs to read all the index values to do that). For efficient paging use ''startkey'' and/or ''startkey_docid''. + The ''skip'' option should only be used with small values, as skipping a large range of documents this way is inefficient (it scans the index from the startkey and then skips N elements, but still needs to read all the index values to do that). For efficient paging you'll need to use ''startkey'' and ''limit''. If you expect to have multiple documents emit identical keys you'll need to use ''startkey_docid'' as well. The ''stale'' option can be used for higher performance at the cost of possibly not seeing the all latest data. If you set the ''stale'' option to ''ok'', CouchDB may not perform any refreshing on the view that may be necessary. Using this option essentially tells CouchDB that if a reference to the view index is available in memory (ie, if the view has been queried at least once since couch was started), go ahead and use it, even if it may be out of date. The result is that for a highly trafficked view, end users can see lower latency, although they may not get the latest data. However, if there is no view index pointer in memory, the behavior with this option is that same as the behavior without the option. If your application use ''stale=ok'' for end-user queries, you'll need either a cron or a notification process like the one described in ["Regenerating views on update"], which queries without ''stale=ok'' to ensure that the view is kept reasonably up to date.