Return-Path: Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: (qmail 74575 invoked from network); 26 Feb 2011 18:03:58 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 26 Feb 2011 18:03:58 -0000 Received: (qmail 47070 invoked by uid 500); 26 Feb 2011 18:03:56 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 47011 invoked by uid 500); 26 Feb 2011 18:03:55 -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 47003 invoked by uid 99); 26 Feb 2011 18:03:54 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 26 Feb 2011 18:03:54 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of robert.newson@gmail.com designates 209.85.214.52 as permitted sender) Received: from [209.85.214.52] (HELO mail-bw0-f52.google.com) (209.85.214.52) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 26 Feb 2011 18:03:47 +0000 Received: by bwj24 with SMTP id 24so2987224bwj.11 for ; Sat, 26 Feb 2011 10:03:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:content-type; bh=WYzaK1W5NJaZnqdLDM+oNHcFldzu6LGVZUsvwr+5Y0Y=; b=sa74qb4J34oHKL1APfRBB8w7gttdgg0f80wBgArm+iqU7sdyiQpXhfGTHzJuKoJVC2 xbjX9MY+hVmRej/kx9kuw8/QQ9azB1ooC521Jo+RKyAojNLo/Ny90cq+ebxEI2SwabYf DxhBxGSD/HqY6lHc0SZUAaSuWKoJJrNRLopMk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=v2Vk4P/4wBO81Y+Og6/xc1jeDZ9G4kl+jfS2EQWQGVhtATO5cBnvp6Vq+DJIZhFF9f CA1e2Wcp+g5XBlysbVJQSY0t6rkZEALpMkzcuDr4D6AJUVMszz+QQcshOk4FPGhHWW+y Bhh1l76jr4Ev6CcdyqmFb5Bs8A7K1yuhWcUZ0= MIME-Version: 1.0 Received: by 10.204.61.199 with SMTP id u7mr3208244bkh.6.1298743406630; Sat, 26 Feb 2011 10:03:26 -0800 (PST) Received: by 10.204.14.193 with HTTP; Sat, 26 Feb 2011 10:03:26 -0800 (PST) In-Reply-To: References: Date: Sat, 26 Feb 2011 13:03:26 -0500 Message-ID: Subject: Re: Last 10 documents From: Robert Newson To: user@couchdb.apache.org Content-Type: text/plain; charset=ISO-8859-1 Using skip as suggested would be bad, yes. ?descending=true&limit=10 should do what you want, are you sure you're passing the parameters correctly? If using curl, it's a common mistake not pass the & character (which backgrounds the task and everything after it is ignored). So put the whole url in single quotes. e.g; curl 'localhost:5984/pathtoview?descending=true&limit=10' B. On 26 February 2011 13:01, Tristan Sloughter wrote: > My understanding is skip should only be used with large numbers. If I have > thousands of documents that would be bad, right? > > Tristan > > On Sat, Feb 26, 2011 at 11:59 AM, Alexander Uvarov < > alexander.uvarov@gmail.com> wrote: > >> Use ?skip=X where X = N - 10 >> >> N = count of documents (using reduce) >> >> On Sat, Feb 26, 2011 at 10:55 PM, Tristan Sloughter >> wrote: >> > I was hoping with descending being true and limit=10 I could get the last >> 10 >> > documents in a view. >> > >> > It does not seem to work for me, is there a way to get the last X results >> in >> > a view without knowing the keys? >> > >> > Thanks, >> > Tristan >> > >> >