couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Fabio Batalha Cunha dos Santos <fabio.bata...@scielo.org>
Subject Re: Doubts with start and end keys + descending=true
Date Wed, 15 Dec 2010 20:24:39 GMT
Now the descending parameter is working but I'm still not having the
expected result.

For example:

1. Results from arg to mex in ascending mode.
http://fabiobatalha.couchone.com/scieloorg/_design/couchdb/_view/article_date?startkey=[%22arg%22]&endkey=[%22mex%22,{}]

the result have arg,chl and mex keys. That's ok!

2. Now flipping. Results from mex to arg in descending mode.
http://fabiobatalha.couchone.com/scieloorg/_design/couchdb/_view/article_date?startkey=[%22mex%22]&endkey=[%22arg%22,{}]&descending=true

the result have only keys = "chl". That isn't ok, I was expecting mex, chl
and arg in the descending mode.

Other Example:

1. Results with keys = arg
http://fabiobatalha.couchone.com/scieloorg/_design/couchdb/_view/article_date?startkey=[%22arg%22]&endkey=[%22arg%22,{}]

the result is a list with key = arg. That's ok!

http://fabiobatalha.couchone.com/scieloorg/_design/couchdb/_view/article_date?startkey=[%22arg%22]&endkey=[%22arg%22,{}]&descending=true

In this example I can't just flip the key values once I'm filtering only one
key value "arg"
the result is a empty list with. That isn't ok, I was expecting a key="arg"
list in the descending mode

Thanks,
*Fabio Batalha C. Santos*
Colegiado SciELO
www.scielo.org
FAPESP - CNPq - BIREME - FapUNIFESP



On Wed, Dec 15, 2010 at 5:08 PM, Matthew Woodward <matt@mattwoodward.com>wrote:

> On Wed, Dec 15, 2010 at 10:58 AM, Sebastian Cohnen <
> sebastiancohnen@googlemail.com> wrote:
>
> > try to flip startkey/endkey when discending=true :)
> >
>
> Yep, ran into this just yesterday and that was indeed the trick.
> --
> Matthew Woodward
> matt@mattwoodward.com
> http://blog.mattwoodward.com
> identi.ca / Twitter: @mpwoodward
>
> Please do not send me proprietary file formats such as Word, PowerPoint,
> etc. as attachments.
> http://www.gnu.org/philosophy/no-word-attachments.html
>

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