Return-Path: Delivered-To: apmail-incubator-couchdb-user-archive@locus.apache.org Received: (qmail 49559 invoked from network); 4 Oct 2008 20:40:41 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 4 Oct 2008 20:40:41 -0000 Received: (qmail 55597 invoked by uid 500); 4 Oct 2008 20:40:38 -0000 Delivered-To: apmail-incubator-couchdb-user-archive@incubator.apache.org Received: (qmail 55572 invoked by uid 500); 4 Oct 2008 20:40:38 -0000 Mailing-List: contact couchdb-user-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: couchdb-user@incubator.apache.org Delivered-To: mailing list couchdb-user@incubator.apache.org Received: (qmail 55561 invoked by uid 99); 4 Oct 2008 20:40:38 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 04 Oct 2008 13:40:38 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of paul.joseph.davis@gmail.com designates 74.125.92.146 as permitted sender) Received: from [74.125.92.146] (HELO qw-out-1920.google.com) (74.125.92.146) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 04 Oct 2008 20:39:36 +0000 Received: by qw-out-1920.google.com with SMTP id 4so528896qwk.54 for ; Sat, 04 Oct 2008 13:40:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=hvstSSXxdEu0D9edJdYTLZZ8ttCRy5aAZROz7TcaAdM=; b=Vn3SlgauRz/rvzR64tWr9O7q07sOpOJJYVAcWYU7+nYTZ3uGYAPey7Yxkvu/G4S7uw uy2hgZN0k8qB4cD6jQKU/Np69eHvr+3iWm1GcsTIvvKSWnmXb2aOu0QOB2w5qXHu/U6Z lQzKpj4jnJBL+PlKKTueUTDEb6Bw6Am4D0CsI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=mbzmViLREe1fzQyvq0bu6lnDymEKg6CKS07XKqnlJLNZrJ3hpiagr2y5jC1GWGnqvL G+H5yiz9bAFp6TmxvAl7dI3Qmix9qLPN0LDiIM0KDD14Rk6MAsktQRHzlF20UFbsIagx 1JBdLzG49fmA8LVdRzV/tigcNFgLY2nugeunk= Received: by 10.214.244.9 with SMTP id r9mr3994096qah.76.1223152801406; Sat, 04 Oct 2008 13:40:01 -0700 (PDT) Received: by 10.214.216.1 with HTTP; Sat, 4 Oct 2008 13:40:01 -0700 (PDT) Message-ID: Date: Sat, 4 Oct 2008 16:40:01 -0400 From: "Paul Davis" To: couchdb-user@incubator.apache.org Subject: Re: Bulk Delete In-Reply-To: <9E9A480C-EC26-427F-A00C-340B03F4E48A@me.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <9E9A480C-EC26-427F-A00C-340B03F4E48A@me.com> X-Virus-Checked: Checked by ClamAV on apache.org You should be able to do that via: 1. Define view that emits id and rev's of bad docs: emit(doc._id, doc._rev) 2. Get list of bad docs from view 3. Use _bulk_docs with the _deleted=true member to delete the docs See: http://wiki.apache.org/couchdb/HttpDocumentApi Paul On Sat, Oct 4, 2008 at 4:28 PM, Niket Patel wrote: > Hello, > > Due to bug(infinite loop) in application code, I have end up with > thousands(20K) of documents in just few hours. > I want to delete all documents with particular attribute value. > is that possible with single API call? > or replication is possible with view(subset of documents) so I replicate > good docs to other db and delete original and replicate again? > > Thanks >