Return-Path: X-Original-To: apmail-couchdb-user-archive@www.apache.org Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 952A7C4D2 for ; Sun, 3 Nov 2013 21:17:45 +0000 (UTC) Received: (qmail 27699 invoked by uid 500); 3 Nov 2013 21:17:44 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 27668 invoked by uid 500); 3 Nov 2013 21:17:44 -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 27660 invoked by uid 99); 3 Nov 2013 21:17:44 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 03 Nov 2013 21:17:44 +0000 X-ASF-Spam-Status: No, hits=-0.5 required=5.0 tests=FREEMAIL_ENVFROM_END_DIGIT,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of hknight555@gmail.com designates 74.125.82.42 as permitted sender) Received: from [74.125.82.42] (HELO mail-wg0-f42.google.com) (74.125.82.42) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 03 Nov 2013 21:17:39 +0000 Received: by mail-wg0-f42.google.com with SMTP id n12so1148004wgh.1 for ; Sun, 03 Nov 2013 13:17:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=/wqNCA7fP04JJ5Dfj3aXUBE+SKkX37OaX6CWJQI5JMw=; b=RUp2LQ54EDpN+bEX+UkkBBg3aaNEF7XVevHspKQV4bV1moUvNiOA/avZv+FOqFHwpq V7Yc5u6Fmc4qU3t/Egsa8xzwQA+TPERznTjV8JnOi6Ld8oQLdFaMOD4LkjUm4uvwFKj6 4/qm8IHTNk4cnyRv1o3CTlPHagFagBpjZFopG/7NUml3eX9oKMDLyol8KLmT6EdYg5W6 WRp3eLt8vp+2gxXetsKMI/Gy8LXxkNSi2oX08/1m2wDf5T0YaRYoJUnm8IX97uT7bnPz YEKVvMLO/tBi8/opZHCHwPI6afEfaTIoxsI5s6jAlHMwUMTVArKcqfHfGpSvrOZhiHOY Nzrw== MIME-Version: 1.0 X-Received: by 10.180.36.80 with SMTP id o16mr9812315wij.1.1383513436510; Sun, 03 Nov 2013 13:17:16 -0800 (PST) Received: by 10.217.45.199 with HTTP; Sun, 3 Nov 2013 13:17:16 -0800 (PST) In-Reply-To: References: Date: Sun, 3 Nov 2013 17:17:16 -0400 Message-ID: Subject: Re: CouchDB: Add document through update handler From: Hank Knight To: user@couchdb.apache.org Content-Type: text/plain; charset=ISO-8859-1 X-Virus-Checked: Checked by ClamAV on apache.org Got it, thanks. On Sun, Nov 3, 2013 at 4:14 PM, Robert Newson wrote: > Yes, see the examples in the test suite's update_documents.js. > > B. > > > On 3 November 2013 20:08, Hank Knight wrote: >> I created an Update Handler that works great for updating existing >> documents I want it to continue updating existing documents however >> if the document does not already exist I want it to be created. >> >> Is there a way to make an update handler create a document if the >> document it is requested to update does not exist?