couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cdr53x <cdr...@free.fr>
Subject Complex keys and ranges
Date Mon, 01 Nov 2010 16:56:11 GMT
Hello,

I've read all the docs/wiki again but cannot find anything related to 
views usage when keys are complex JSON objects.

Especially, there are no explanations nor examples of how the ranges ( 
startkey/endkey ) are supposed to behave with complex keys.

For instance let's presume we have the a view with the following map 
function :

function(doc) {
     ...
     emit({ 'date' : created_at  , 'author' : author}, null) ;
}


Would it be possible to "filter" on both date and author ?

For instance get all the docs created in a given time range by a given 
author , by passing a range like  :

   start_key : { 'date' : '201002030000.' , author : 'adams' }
   end_key   : { 'date' : '201003030000.' , author : 'adams' }

?

I have tried this however it does not seem to work that way, so if 
anyone has some info on how this should work, I'd really appreciate

Thanks in advance,

cdrx







Mime
View raw message