On Sun, May 16, 2010 at 11:23 PM, Alexander Uvarov < alexander.uvarov@gmail.com> wrote: > > On 17.05.2010, at 6:58, Jarrod Roberson wrote: > > > > you don't understand my approach, the list function doesn't apply any > rules > > it just merges the duplicate documents, it is exactly the same thing that > a > > RDBMS or say Lucene would do. > > Thanks, now it seems I got it. Sleep deprivation is not cool :( > > > > > your View function would look something like this: > > I don't know what pages_count might need to be queried on so I skipped > it, > > exercise for the reader :-) I am sure you could apply the same logic to > > pages_count that I applied to tags. > > Not applicable. "pages_count": { "in": [1, 500]} is a range. > > emit(['pages_count',doc.pages_count],null); > > '{"keys":[['pages_count',1], ['pages_count',2], ['pages_count',3],... > ['pages_count',500!!!]]}' is unacceptable. Unfortunately there is no range > support in couchdb. > > > you could do a separate query against a pages_count view with ranges via the startkey=1&endkey=500 and that would give range support, but you would still have to merge those ids on the client.