I have a process that sends documents similar to the ones below to CouchDB:
{ "timestamp": [2010, 8, 4, 9, 25, 24], "type": "quote", "bid": 95.0, "offer": 96.5 }
Many such documents are published throughout the day, each of which corresponds accordingly.
I want to create a CouchDB view that returns the last quote stored every day.
I read View SQL Jockeys cookbook on how to create complex views, but I have problems with how to combine the map and reduce functions to achieve the desired result. The card function is simple; this is a reduction function that I'm having problems with.
Any pointers gratefully received.
source share