couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jan Lehnardt <>
Subject Re: incremental map/reduce scope
Date Wed, 26 Mar 2008 01:54:47 GMT
Heya Chris and Sho,
On Mar 25, 2008, at 21:15 , Chris Anderson wrote:
> On Tue, Mar 25, 2008 at 5:34 PM, Sho Fukamachi < 
> > wrote:
>> Will the M/R function be able to reach across databases? For example,
>> if I make one database called couch.local/ blogs and one called
>> couch.local/posts, will I be able to define an index function that
>> reaches into both? Or is it limited to within the scope of one  
>> database?
> Sho,
> I'm not a CouchDB internals expert, but I imagine you could use
> replication to merge two databases at any point in the future.

Just to back you up (as if I had a real clue…)

You are correct, this works today and will in the future.

> I'm also pretty sure that map functions can't reach into the contents
> of more than one document (although reduce will be able to merge all
> data with the same key, I think, so you could perhaps "join" together
> related documents using a clever map function, although you may be
> better off doing joins in your application.)

Again, correct.

With the possibility of using other languages for the M/R functions,
you could, for example, use Python to run the functions and from
within the functions use an HTTP request to get data from another
DB. If you really wanted that. I'd guess though that you'd be better
off with using a database merge with replication or implementing
things on the application level. I might be wrong, though :)

At the moment, we have no plans to add the XMLHTTPRequest
object to our Spidermonkey runtime.

View raw message