From user-return-8822-apmail-couchdb-user-archive=couchdb.apache.org@couchdb.apache.org Wed Feb 17 22:16:48 2010 Return-Path: Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: (qmail 48968 invoked from network); 17 Feb 2010 22:16:48 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 17 Feb 2010 22:16:48 -0000 Received: (qmail 72243 invoked by uid 500); 17 Feb 2010 22:16:47 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 72162 invoked by uid 500); 17 Feb 2010 22:16:47 -0000 Mailing-List: contact user-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@couchdb.apache.org Delivered-To: mailing list user@couchdb.apache.org Received: (qmail 72152 invoked by uid 99); 17 Feb 2010 22:16:47 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 17 Feb 2010 22:16:47 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) Received: from [217.110.7.51] (HELO mail.sourcegarden.de) (217.110.7.51) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 17 Feb 2010 22:16:37 +0000 Received: from [192.168.1.101] (tmo-104-154.customers.d1-online.com [80.187.104.154]) by mail.sourcegarden.de (Postfix) with ESMTP id AE6D51F76A9 for ; Wed, 17 Feb 2010 23:16:09 +0100 (CET) Message-Id: <0A8494CB-1051-451F-AAE9-F27CD09BD885@sourcegarden.de> From: Mario Scheliga To: user@couchdb.apache.org In-Reply-To: <96B56DFD-CE21-4B69-9D43-C8CF3F841C9F@googlemail.com> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v936) Subject: Re: Chaining of views/MapReduce Date: Wed, 17 Feb 2010 23:15:58 +0100 References: <96B56DFD-CE21-4B69-9D43-C8CF3F841C9F@googlemail.com> X-Mailer: Apple Mail (2.936) X-rccsoftware-MailScanner-Information: Please contact the ISP for more information X-rccsoftware-MailScanner-ID: AE6D51F76A9.33710 X-rccsoftware-MailScanner: Found to be clean X-rccsoftware-MailScanner-SpamCheck: not spam, SpamAssassin (nicht zwischen gespeichert, Wertung=1.958, benoetigt 6, BAYES_00 -2.60, RCVD_IN_PBL 0.91, RCVD_IN_SORBS_WEB 0.62, RCVD_IN_XBL 3.03) X-rccsoftware-MailScanner-SpamScore: s X-rccsoftware-MailScanner-From: mario@sourcegarden.de X-Virus-Checked: Checked by ClamAV on apache.org X-Old-Spam-Status: No Hi Norman, updating a document from map-function its not possible and seems to be the wrong way. Thinking of map function processing docs seperatly (sandbox), so you are able to spread the execution over thousand of servers ;-) greez mario Am 17.02.2010 um 21:04 schrieb Norman Rosner: > Hi folks, > > first, I'll have to admit that I'm kinda new to JavaScript and of > course to CouchDB. Second I just reuse the subject so I hope it > also pops up if anybody searches for it. > > As I read chaining of views is not possible yet but it's mentioned > couple of times on the mailing list. So here's what I want to do: > > 1. Create a list of unique labels/tags/whatever through all of the > documents (e.g. all nouns that are in the documents) > 2. Extract all labels/tags/nouns of each document and check them > again the before calculated result in some kind of way > > For the second point I created a view which works except of the > checking against the result from point 1. Now I'm trying to solve > point 1. > And here my questions begin: How can I create/update a document from > inside of a map function? As I think of it, I'll have to make a HTTP > GET to load the document in each iteration. I found some HTTP stuff > in the test.js in the test folder, but I'm not quite sure how to use > it and if it's the right way of thinking? Is there any way of using > global variables throughout 'couchapps' (e.g. through the lib folder > and thelike)? > > Any help of you CouchDB kings would be greatly appreciated! > > Cheers, > > norman -- Sourcegarden GmbH HR: B-104357 Steuernummer: 37/167/21214 USt-ID: DE814784953 Geschaeftsfuehrer: Mario Scheliga, Rene Otto Bank: Deutsche Bank, BLZ: 10070024, KTO: 0810929 Schoenhauser Allee 51, 10437 Berlin