incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Anderson <jch...@apache.org>
Subject Re: sorting documents using multiple keys
Date Fri, 25 Dec 2009 21:58:30 GMT
On Fri, Dec 25, 2009 at 7:53 AM, Borja Martín <borjam@dagi3d.net> wrote:
> Hi,
> by the moment this isn't a solution as we will work with a large dataset.
> Probably we could preprocess the result and store it as cache as you
> suggested but I think a native solution from couchdb would be fine.
>

There are widespread requests for an enhancement to the multi-key
query feature, which would allow you to POST a collection of queries
(start and end key, limit, etc).

See:

http://issues.apache.org/jira/browse/COUCHDB-523

and

http://issues.apache.org/jira/browse/COUCHDB-137

I haven't written this patch because it is fairly trivial and would be
a good place for a new developer to get started with hacking on
CouchDB.

So, to be clear, many people are having the same issue as you. We're
just waiting for someone to write the patch.

If anyone wants to approach this, please bring it up on the dev@ list
and we'll be glad to help you orient yourself.

Cheers,
Chris

> Regards
>
> On Thu, Dec 24, 2009 at 1:07 PM, Patrick Barnes <mrtrick@gmail.com> wrote:
>
>> Perhaps if you have a document set small enough to retrieve by explicit
>> keys, you can just sort by date on the client?
>>
>> -Patrick
>>
>> On 24/12/2009 9:17 PM, "Borja Martín" <borjam@dagi3d.net> wrote:
>>
>> Hi,
>> thanks for your answer. The thing is that this solution only works for
>> single keys and I can't use the startkey/endkey params in the POST request
>> with the 'keys' param in order to query for multi keys
>>
>> (Thanks for the include_docs tip :))
>>
>> Regards
>>
>> On Thu, Dec 24, 2009 at 3:43 AM, Anand Chitipothu <anandology@gmail.com
>> >wrote:
>>
>> > > Then, I create a view to store the documents for each tag: > > >
>
>> function(doc) { > > for(v...
>>
>> -- def dagi3d(me) case me when :web then "http://dagi3d.net" when :twitter
>> then "http://twi...
>>
>
>
>
> --
> def dagi3d(me)
>  case me
>   when :web then  "http://dagi3d.net"
>   when :twitter then "http://twitter.com/dagi3d"
>  end
> end
>



-- 
Chris Anderson
http://jchrisa.net
http://couch.io

Mime
View raw message