+1 for _load_docs :) On Mon, Aug 4, 2008 at 2:57 PM, Chris Anderson <[EMAIL PROTECTED]> wrote:
> On Mon, Aug 4, 2008 at 11:40 AM, Chris Anderson <[EMAIL PROTECTED]> wrote: > > On Mon, Aug 4, 2008 at 11:31 AM, Tom Wright <[EMAIL PROTECTED]> > wrote: > >> > >> Is there a way (or is a way planned) for the documents to be optionally > >> attached to a view's result rows via a query string argument? > > > > We were just discussing this on IRC the other day. It should be a > > relatively simple patch to make. > > I thought about this some more, and even started writing some tests > for it. Now I'm pretty convinced that this is not the way to go. > > Because map functions can emit() many times per document, you'd often > end up transferring much more data than you need to - if a document > maps to 5 keys in your key range you'll get the same document over the > wire 5 times. > > The better course of action would be to use the (non-existent) > _load_docs API to load multiple documents. Then you'd do 2 requests > from PHP - one to load the view results, and one to request the > (unique) set of documents associated with the view rows. > > -- > Chris Anderson > http://jchris.mfdz.com >
