Return-Path: Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: (qmail 83105 invoked from network); 26 Feb 2011 18:06:12 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 26 Feb 2011 18:06:12 -0000 Received: (qmail 49604 invoked by uid 500); 26 Feb 2011 18:06:10 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 49500 invoked by uid 500); 26 Feb 2011 18:06:09 -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 49490 invoked by uid 99); 26 Feb 2011 18:06:08 -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:06:08 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=FREEMAIL_FROM,HTML_MESSAGE,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 kungfooguru@gmail.com designates 209.85.215.52 as permitted sender) Received: from [209.85.215.52] (HELO mail-ew0-f52.google.com) (209.85.215.52) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 26 Feb 2011 18:06:01 +0000 Received: by ewy10 with SMTP id 10so1003809ewy.11 for ; Sat, 26 Feb 2011 10:05:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=UkCaSvP068Ujnqd+OFcjFKkMQXZADrOrpJqH+SvWuDo=; b=gfDibwPIAFln6sNPYMUcCEE/D8SE0PZWFHTmyH6QxsnrHJikPFq6vgyXFT2GHBzNqI fua50Y5t1yq2x8Skepu8Z7oTJu/A7lLblkNJjzCDO3Qm5E+8xqYnNTgOUOlQRq97ZHuu AVQ9mvBDR1yjlLVJw6eOHbfyUZBC1i/LsSZRo= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; b=rCQLthwCLcRdE1Rs3ReRY/z87I1qUrNfV8O+YSD6OZG80IoCeL27kEuAfHu5ys5kQF 9rKSQJtqIeS+msVZXcEDS5cYPetynQsGszHaGlBDKO5X2VlbtrVoM4ARpvwYHY078qsu +YjaMvPQu4K2tEi1FgisKOLOom/e0pq9XYt5I= MIME-Version: 1.0 Received: by 10.213.15.135 with SMTP id k7mr3150719eba.26.1298743540579; Sat, 26 Feb 2011 10:05:40 -0800 (PST) Sender: kungfooguru@gmail.com Received: by 10.213.2.207 with HTTP; Sat, 26 Feb 2011 10:05:40 -0800 (PST) In-Reply-To: References: Date: Sat, 26 Feb 2011 12:05:40 -0600 X-Google-Sender-Auth: qJs60n7e4f67rhje8nMWZHDr3Ro Message-ID: Subject: Re: Last 10 documents From: Tristan Sloughter To: user@couchdb.apache.org Cc: Robert Newson Content-Type: multipart/alternative; boundary=0015174bde3663fc9b049d334b0c --0015174bde3663fc9b049d334b0c Content-Type: text/plain; charset=ISO-8859-1 Yeah, sorry, I went and did some manually testing right before I got this and you are right. It does work and something must be wrong else where. Thanks, Tristan On Sat, Feb 26, 2011 at 12:03 PM, Robert Newson wrote: > 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 > >> > > >> > > > --0015174bde3663fc9b049d334b0c--