*so*<http://joy.thesocialsoft.com:5984/_utils/browse/document.html?pop/85682a8de2ef1b132de036ad09479403>by
sortable_timestamp u mean
*created, time or date*
as those are the columns in all my db, there is no sortable_timestamp column
class Invite(Document):
    name = TextField()
    appname = TextField()
    uid = LongField()
    invuids = ListField(LongField())
    count = IntegerField()
    created = DateTimeField(default=datetime.datetime.now())
    time =TimeField(default=datetime.datetime.now())
    date = DateField(default=datetime.date.today())

On Fri, Jan 9, 2009 at 11:51 PM, Paul Davis <[email protected]>wrote:

> On Fri, Jan 9, 2009 at 9:41 PM, paul jobs <[email protected]> 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 <[email protected]>
> 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 <[email protected]> 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 <[email protected]>
> 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
> >>
> >
>

Reply via email to