incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tristan Sloughter <tristan.slough...@gmail.com>
Subject Re: Last 10 documents
Date Sat, 26 Feb 2011 18:05:40 GMT
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 <robert.newson@gmail.com>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
> <tristan.sloughter@gmail.com> 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
> >> <tristan.sloughter@gmail.com> 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
> >> >
> >>
> >
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message