emit the doc.date as the key then use the view query options to find the most
recent: http://wiki.apache.org/couchdb/HTTP_view_API#Querying_Options
the id is included in the map.
On Monday, 19 August 2013 at 16:41, souza.davirs wrote:
> I have this map:
> function (doc) {
> if (doc.event == 'TEST')
> emit (doc.data.id, doc.data);
> }
> reduce:
> function (key, values) {
> var v = null;
> for (var d in values) {
> if (v == null | | values [d]. date> v.date)
> v = values [d]
> }
> return v
> }
>
> but it is very slow, how can I improve performance?
>
> Thank you.
>
>
>
> --
> View this message in context:
> http://couchdb-development.1959287.n2.nabble.com/how-to-get-last-id-changed-tp7586830.html
> Sent from the CouchDB Development mailing list archive at Nabble.com
> (http://Nabble.com).