incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Metin Akat <akat.me...@gmail.com>
Subject Re: ranking a big list
Date Sat, 06 Feb 2010 16:27:25 GMT
Write a function that emits every student's score.
Query the view with that score as a key and descending=true
The view will return the offset of the returned result.
That's the position of all the students that have this score.

On Sat, Feb 6, 2010 at 5:47 PM, Mano <manokaran@gmail.com> wrote:
> On Sat, Feb 6, 2010 at 6:57 PM, Metin Akat <akat.metin@gmail.com> wrote:
>
>> Hi,
>> What if 2 students have score of 200 and the next 3 have score of 199?
>> How do you decide who is fourth?
>>
>>
> There is no fourth rank in that case. Only first (the 2 200's) third (the 3
> 199's) and sixth etc ranks.
>
> regds,
> mano
>

Mime
View raw message