Return-Path: X-Original-To: apmail-couchdb-dev-archive@www.apache.org Delivered-To: apmail-couchdb-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id AEA7917B62 for ; Mon, 6 Apr 2015 04:58:12 +0000 (UTC) Received: (qmail 45341 invoked by uid 500); 6 Apr 2015 04:58:12 -0000 Delivered-To: apmail-couchdb-dev-archive@couchdb.apache.org Received: (qmail 45274 invoked by uid 500); 6 Apr 2015 04:58:12 -0000 Mailing-List: contact dev-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@couchdb.apache.org Delivered-To: mailing list dev@couchdb.apache.org Received: (qmail 45261 invoked by uid 99); 6 Apr 2015 04:58:12 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 06 Apr 2015 04:58:12 +0000 Date: Mon, 6 Apr 2015 04:58:12 +0000 (UTC) From: "ASF subversion and git services (JIRA)" To: dev@couchdb.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (COUCHDB-2651) Deleting a Mango Design Docs using bulk docs MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/COUCHDB-2651?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14480936#comment-14480936 ] ASF subversion and git services commented on COUCHDB-2651: ---------------------------------------------------------- Commit 6490184bf36c6eb04587d5fb3bd86923e62ec2b5 in couchdb-mango's branch refs/heads/master from [~tonysun83] [ https://git-wip-us.apache.org/repos/asf?p=couchdb-mango.git;h=6490184 ] Enable bulk deletes Add _bulk_delete path to _index so that users can bulk delete indexes via POST. Users will pass in a list of docids via the POST body. We delete each index one by one until an error is thrown or all indexes in the list are deleted. We return a list of successful deletes and failed deletes along with the ids. For a single delete, we still throw the same errors as before to be backwards compatible with any applications expecting an error. Fixes COUCHDB-2651 > Deleting a Mango Design Docs using bulk docs > -------------------------------------------- > > Key: COUCHDB-2651 > URL: https://issues.apache.org/jira/browse/COUCHDB-2651 > Project: CouchDB > Issue Type: Bug > Security Level: public(Regular issues) > Components: go > Reporter: Robert Kowalski > > In Fauxtont the user can list documents / indexes and select multiple of them. The user can then press one button to delete all selected documents. > This works for Mango created design docs, but it is quite hard to get the revision id as /_index does not list them. Current workarounds are: > 1. firing a lot of multiple requests, but given that one doc list can have 100 entries this is not a viable solution: > curl -XGET "http://localhost:8000/animaldb/_design/e4d338e5d6f047749f5399ab998b4fa04ba0c816" > {"_id":"_design/e4d338e5d6f047749f5399ab998b4fa04ba0c816","_rev":"1-1f37105891681e717ae37dae973bc6a4","language":"query","views":{"e4d338e5d6f047749f5399ab998b4fa04ba0c816":{"map":{"fields":{"_id":"asc"}},"reduce":"_count","options":{"def":{"fields":["_id"]},"w":2}}}} > 2. Querying all the design docs with includedocs, and don't use the _index endpoint, then filter out all all indexes which are not mango indexes and use the result for building the list of documents which then can get checked and deleted (downside: performance, not using the existing endpoint from mango which makes it a bit obsolete, at least for Fauxton) > For me there are two possible solutions: > - returning the rev id in GET /_index > - implementing an additional POST /_bulk_index endpoint > while I would prefer the first as the _bulk_docs endpoint already exists and works very well. -- This message was sent by Atlassian JIRA (v6.3.4#6332)