I should have been more precise in my question.

If the timestamp has the following format "dd mmm eye hh:mm:ss" for example 
"10 Oct 2014 12:20:21"

Will the sorting on key be able to figure out it is dealing with a 
timestamp rather than a simple string and sort accordingly ? I am sensing 
it will do alphabetical sort instead?

Andrew

On Friday, December 19, 2014 5:44:17 PM UTC+1, Jens Alfke wrote:
>
>
> On Dec 19, 2014, at 4:07 AM, Andrew <[email protected] <javascript:>> 
> wrote:
>
> Hi - i have a collection of documents sharing a lastModified timestamp 
> field in a standard format going down to the second granularity.
> Is it possible to design a view that will return these documents sorted by 
> the lastModified property in either increasing or decreasing order?
>
>
> Sure. Just have the map function emit the lastModified property as the key.
> To query in decreasing order, set the Query's .descending property.
>
> —Jens
>

-- 
You received this message because you are subscribed to the Google Groups 
"Couchbase Mobile" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/mobile-couchbase/7252ec66-bbcb-44ad-a070-58f29d65e25a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to