incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From msc...@eprometeus.com
Subject Re: Couchdb views using time
Date Sun, 11 Jan 2009 17:44:53 GMT
Kl^^^0dd00000. 00000.  0 0.                                                               
                                                                                         
                                                                                         
                                                                                         
                                                            0.                           
                                                                                         
                                                                                         
                                                                                         
                                                                000000000000000000000. 000000
000000000000000000.                                                                      
           000000.                                                             00000000000000000000000000000000000000
00 0.                            0 0000000000. 00000000000000000000000000000000000000000000
00.                                                                                      
    000000000000000000000000000000000000000000000000000000000000000000000000000000.     000000000000000000000000000000000000.
                                                                                        0000000.
                                                                                         
                                   00000000000000000000.           0000000000000000000000000000000000000000000000000000000000000000000000000.
00 0doitttTttovBvgewq0rtoddorrd0rq0dqa0ccqqaw1wwwoowEoPOPooOeOOOoOOoOOOoOOOOOOoOOOOOOeoOOto
------Original Message------
From: Paul Davis
Sender: 
To: user@couchdb.apache.org
ReplyTo: user@couchdb.apache.org
Sent: Jan 10, 2009 7:51 AM
Subject: Re: Couchdb views using time

On Fri, Jan 9, 2009 at 9:41 PM, paul jobs <webjogger@gmail.com> wrote:
> Thanks chris
> Ok, but how to get the list of items that are in the last one hour, since
> the list is about 3 million users

Paul,

emit([doc.user, doc.sortable_timestamp], null)

Paul


> so extracting the 3 million using this view and then processing the results
> in python doesnt seem feasible
> thanks a lot
>
> On Fri, Jan 9, 2009 at 10:52 PM, Chris Anderson <jchris@gmail.com> wrote:
>
>> just have a map view that calls emit(doc.timestamp, null) as long as
>> your timestamp format sorts correctly.
>>
>> On Fri, Jan 9, 2009 at 3:47 PM, paul jobs <webjogger@gmail.com> wrote:
>> > This is very useful for eg., to delete posts older than one day
>> > get users who logged in the last 1 hour etc
>> >
>> > On Fri, Jan 9, 2009 at 3:47 PM, paul jobs <webjogger@gmail.com> wrote:
>> >
>> >> select * from users where ((extract('epoch' from now()) -
>> extract('epoch'
>> >> from last_login)) < 3000000) order by last_login DESC
>> >>
>> >> is it possible to construct such views using couchdb permanent views?
>> >>
>> >> thanks
>> >>
>> >
>>
>>
>>
>> --
>> Chris Anderson
>> http://jchris.mfdz.com
>>
>


Sent from my BlackBerry® wireless device
Mime
View raw message