From commits-return-2932-apmail-couchdb-commits-archive=couchdb.apache.org@couchdb.apache.org Fri Aug 14 11:32:48 2009 Return-Path: Delivered-To: apmail-couchdb-commits-archive@www.apache.org Received: (qmail 17033 invoked from network); 14 Aug 2009 11:32:48 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 14 Aug 2009 11:32:48 -0000 Received: (qmail 11822 invoked by uid 500); 14 Aug 2009 11:32:54 -0000 Delivered-To: apmail-couchdb-commits-archive@couchdb.apache.org Received: (qmail 11703 invoked by uid 500); 14 Aug 2009 11:32:54 -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 11686 invoked by uid 500); 14 Aug 2009 11:32:54 -0000 Delivered-To: apmail-incubator-couchdb-commits@incubator.apache.org Received: (qmail 11669 invoked by uid 99); 14 Aug 2009 11:32:48 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 14 Aug 2009 11:32:48 +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; Fri, 14 Aug 2009 11:32:46 +0000 Received: from eos.apache.org (localhost [127.0.0.1]) by eos.apache.org (Postfix) with ESMTP id 777A3118C0 for ; Fri, 14 Aug 2009 11:32:26 +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: Fri, 14 Aug 2009 11:32:26 -0000 Message-ID: <20090814113226.1502.12535@eos.apache.org> Subject: [Couchdb Wiki] Update of "HTTP view API" by GabrielBirke 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 GabrielBirke: http://wiki.apache.org/couchdb/HTTP_view_API The comment on the change is: Small clarification on startkey_docid ------------------------------------------------------------------------------ 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 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 ''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. Otherwise ''startkey_docid'' will be ignored. 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.