Somewhat, but must download all the data where it will be available for sorting in different order on user-selected column (jQuery DataTable). Still that covers the basics for grabbing the results, and I can adapt that to download the remaining rows. Thx for the URL.
P.S. As something I just want to know, is there an issue with mixing start() with provides() inside a list function? Was surprised at the badarg exceptions... On Jul 18, 2013, at 8:52 AM, Tim Tisdall wrote: > Does this help? http://guide.couchdb.org/draft/recipes.html#pagination > > > On Thu, Jul 18, 2013 at 9:05 AM, Paul Roebuck <[email protected]>wrote: > >> Have a couchapp whose list() can't seem to output its information >> before OS timeout occurs. We initially just increased the OS timeout, >> but still have issues depending on whatever else is going on. >> >> What is the recommended means of paginating the output with >> multiple calls (i.e., pieces parts instead of the whole enchilada)? >> >> list(head, req) { >> provides("json") { >> // generate time consuming output >> } >> provides("xml") { >> // generate time consuming output >> } >> } >> >> Had initially thought of adding a response header and doing a HEAD >> call, but had problems kept getting badarg exceptions (does using >> provides() preclude using start()?). >> >> list(head, req) { >> start({ >> headers: { >> "X-NRows": head.total_rows >> } >> }); >> >> provides("json") { >> if (req.method === 'HEAD') >> return ""; >> >> // generate time consuming output >> } >> provides("xml") { >> // generate time consuming output >> } >> } >> >> Assuming I can retrieve this value, then the idea was to make a series >> of GETs to same list function with its view using 'limit=' and 'start=', >> collating the output using mbostock's QueueJS on HTML page prior >> to display. >> >> Or is there a better way? >> >> Thx. >>
