incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Eli Stevens (Gmail)" <wickedg...@gmail.com>
Subject Re: Views with composite keys inclusive_end not functioning correctly
Date Tue, 28 Sep 2010 00:55:43 GMT
I *think* that instead of using inclusive_end, you want to have
endkey=["AA", {}] .

The {} is considered to come after all other key values.

Per my understanding, inclusive_end is for when you know *exactly*
what key you want to stop on.

Eli

On Mon, Sep 27, 2010 at 5:50 PM, Danny Brain <tehdanish@gmail.com> wrote:
> Hello,
>
> I'm having an issue where views with composite keys are not inclusive of the
> endkey, even with inclusive_end specified as true.
> This is preventing me from correctly selecting a group of documents as per
> the "Linked documents" section on the Http view API wiki page (
> http://wiki.apache.org/couchdb/Introduction_to_CouchDB_views)
>
> I'm running CouchDb 1.0.1. Example of the issue I'm seeing:
>
> composite_key_view?startkey=["AA"]&inclusive_end=true
> {"id":"1","key":["AA",0],"value":null},
> {"id":"1","key":["AA",1],"value":{"_id":"4"}},
> {"id":"2","key":["BB",0],"value":null}
>
> composite_key_view?startkey=["AA"]&endkey=["AA"]&inclusive_end=true
> No results
>
> composite_key_view?startkey=["AA"]&endkey=["BB"]&inclusive_end=true
> {"id":"1","key":["AA",0],"value":null},
> {"id":"1","key":["AA",1],"value":{"_id":"4"}}
>
> The last example works, but requires me to know what comes after AA in the
> results, and you'd think inclusive_end would make BB show up as well.
> Has anyone had this problem? Any ideas on how to solve it?
>
> Thanks!
>



-- 
Eli

Mime
View raw message