couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Robert Newson <rnew...@apache.org>
Subject Re: HTTP request with CouchDB
Date Wed, 13 Nov 2013 15:50:10 GMT
what Jens said. We prevent this deliberately. Crowbar it back in at
your own risk.

B.


On 13 November 2013 15:45, Jens Alfke <jens@couchbase.com> wrote:
>
> On Nov 13, 2013, at 4:48 AM, Hank Knight <hknight555@gmail.com> wrote:
>
>> function(doc, req) {
>>    var http = new XMLHttpRequest();
>>    http.open( "GET", "http://www.w3schools.com/xml/note.xml", false );
>>    http.send( null );
>>    emit("xyz",http.responseText);
>> }
>
> Wait, is that supposed to be a map function? Whether or not this is technically feasible,
it’s an incorrect use of map/reduce.
>
> It’s critical that a map function be a ‘pure' function with no access to outside
state. That is, every time the function is called with the same input, it must produce the
same output. Otherwise you won’t get a self-consistent index.
>
> —Jens

Mime
View raw message