Return-Path: Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: (qmail 80185 invoked from network); 5 Apr 2010 12:28:30 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 5 Apr 2010 12:28:30 -0000 Received: (qmail 92006 invoked by uid 500); 5 Apr 2010 12:28:29 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 91962 invoked by uid 500); 5 Apr 2010 12:28:29 -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 91954 invoked by uid 99); 5 Apr 2010 12:28:29 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 05 Apr 2010 12:28:29 +0000 X-ASF-Spam-Status: No, hits=-2.4 required=10.0 tests=AWL,RCVD_IN_DNSWL_MED,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [145.58.30.185] (HELO out1b.mail.omroep.nl) (145.58.30.185) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 05 Apr 2010 12:28:21 +0000 Received: from localhost (ou1bclean [10.10.30.159]) by out1b.mail.omroep.nl (Postfix MTA - NPO ICT) with ESMTP id 569343000134; Mon, 5 Apr 2010 14:27:59 +0200 (CEST) X-Virus-Scanned: NPO ICT Received: from tweehoog.vpro.nl (tweehoog.vpro.nl [145.58.169.4]) by out1b.mail.omroep.nl (Postfix MTA - NPO ICT) with ESMTP id 3B747300008E; Mon, 5 Apr 2010 14:27:59 +0200 (CEST) Received: from exmail.vpro.nl ([145.58.171.81] helo=VS-EX-01.intra.vpro.nl) by tweehoog.vpro.nl with esmtp (Exim 3.36 #1) id 1NylPL-0002jp-00; Mon, 05 Apr 2010 14:27:59 +0200 Received: from VS-EX-01.intra.vpro.nl ([145.58.171.81]) by VS-EX-01.intra.vpro.nl ([145.58.171.81]) with mapi; Mon, 5 Apr 2010 14:27:58 +0200 From: Nils Breunese To: "user@couchdb.apache.org" , "djassper@gmail.com" Date: Mon, 5 Apr 2010 14:23:34 +0200 Subject: RE: delete Docs Thread-Topic: delete Docs Thread-Index: AcrUuasLD9pRAt0iQRmZ+gxBuOWp6AAASRRQ Message-ID: References: In-Reply-To: Accept-Language: nl-NL Content-Language: nl-NL X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: nl-NL Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 You don't need to GET the full document to retrieve the current revision. Y= ou can just do a HEAD request and look at the Etag header, which contains t= he document _rev. ---- $ curl --head http://example.com/database/document HTTP/1.1 200 OK Date: Mon, 05 Apr 2010 12:26:39 GMT Server: CouchDB/0.10.1 (Erlang OTP/R13B) Etag: "86-ff15272d40894c8d7ece25891a874230" (...) ---- I usually work with a CouchDB library which abstracts this away (I like cou= chdb-python for scripting), but I guess they all use HEAD requests under th= e hood. Nils Breunese. ________________________________________ Van: Fred Lemasson [djassper@gmail.com] Verzonden: maandag 5 april 2010 14:14 Aan: user@couchdb.apache.org Onderwerp: delete Docs I everyone I could use some advice on CouchDB "Best Pratice" for deleting documents. Lets say I know the id of some docs I want to delete, I still have to retreive their _rev number before sending the DELETE. So, do I really have to read(GET request) an entire document just to get its _rev or should I create a _view to get _id + _rev pairs ? Both ways seem non ideal to me, because why loading an entire document just to read its _rev (it might be a really big doc and u might have a lot of them) and why create a _view that will suffer from indexation process, reading a single value is supposed to be quick ... Or may be there is a way to get "just" the _rev from some doc _id that I don't know about ? Feel free to show me the way ... and let me know how u proceed ... Fred De informatie vervat in deze e-mail en meegezonden bijlagen is uitsluitend= bedoeld voor gebruik door de geadresseerde en kan vertrouwelijke informati= e bevatten. Openbaarmaking, vermenigvuldiging, verspreiding en/of verstrekk= ing van deze informatie aan derden is voorbehouden aan geadresseerde. De VP= RO staat niet in voor de juiste en volledige overbrenging van de inhoud van= een verzonden e-mail, noch voor tijdige ontvangst daarvan.