couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ning Tan <ning...@gmail.com>
Subject Re: Help with complex key range query and map/reduce
Date Mon, 28 Sep 2009 21:00:41 GMT
On Mon, Sep 28, 2009 at 4:51 PM, Glenn Rempe <glenn@rempe.us> wrote:
>
> startkey = [1, 2009, 9, 1, "g"]
> endkey = [1, 2009, 9, 28, "g"]
>
> Would it not return category 1, across the entire date range, but limited to
> those with the engine 'g' only?

No. CouchDB keys are not filters. They occupy a linear space, and as
long as a key is "larger" than (or equal to) the startkey and
"smaller" than (or equal to) the endkey, the corresponding row is
included in query results. In the above case, [1, 2009, 9, 1, "h"]
will be included in your query result. There is a Wiki page on view
collation that explains this.

Mime
View raw message