On Fri, Aug 1, 2008 at 10:17 AM, Demetrius Nunes
<[EMAIL PROTECTED]> wrote:
> Also, can I share some state between "map" calls or pass external parameters
> to it besides the default "doc" parameter?

You have to be very careful with things like this - shared state is a
definite no-no, as you must ensure the map functions output the same
thing regardless of the order in which documents are processed.

I include utility functions in a separate file automatically when I
push views to CouchDB. My design documents turn out longer in Futon
than in my editor, with lots of code duplicated across the views, but
it doesn't really impact performance, as the functions are compiled
only once per document batch.




-- 
Chris Anderson
http://jchris.mfdz.com

Reply via email to