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 018C7D8B6 for ; Thu, 30 Aug 2012 16:30:40 +0000 (UTC) Received: (qmail 79600 invoked by uid 500); 30 Aug 2012 16:30:38 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 79542 invoked by uid 500); 30 Aug 2012 16:30:38 -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 79533 invoked by uid 99); 30 Aug 2012 16:30:38 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 30 Aug 2012 16:30:38 +0000 X-ASF-Spam-Status: No, hits=0.7 required=5.0 tests=FSL_RCVD_USER,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (nike.apache.org: local policy) Received: from [198.235.201.17] (HELO barracuda.northwestel.ca) (198.235.201.17) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 30 Aug 2012 16:30:31 +0000 X-ASG-Debug-ID: 1346344207-04700c4975061c0001-z14J5S Received: from [192.168.1.103] ([199.247.191.174]) by barracuda.northwestel.ca with ESMTP id e0a9XvtpqCCiDFfJ for ; Thu, 30 Aug 2012 09:30:07 -0700 (PDT) X-Barracuda-Envelope-From: stephan@bardubitzki.com X-Barracuda-Apparent-Source-IP: 199.247.191.174 Message-ID: <503F9510.2050002@bardubitzki.com> Date: Thu, 30 Aug 2012 09:30:08 -0700 From: Stephan Bardubitzki User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:14.0) Gecko/20120714 Thunderbird/14.0 MIME-Version: 1.0 To: user@couchdb.apache.org Subject: Re: auto delete docs References: <503F8A7A.10503@bardubitzki.com> <503F8E4C.2060600@bardubitzki.com> <820406CE2A8D4A7CA9E538821094CB52@cloudant.com> X-ASG-Orig-Subj: Re: auto delete docs In-Reply-To: <820406CE2A8D4A7CA9E538821094CB52@cloudant.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Barracuda-Connect: UNKNOWN[199.247.191.174] X-Barracuda-Start-Time: 1346344207 X-Barracuda-URL: http://198.235.201.17:8000/cgi-mod/mark.cgi X-Virus-Scanned: by bsmtpd at northwestel.ca X-Barracuda-Spam-Score: 0.00 X-Barracuda-Spam-Status: No, SCORE=0.00 using per-user scores of TAG_LEVEL=1000.0 QUARANTINE_LEVEL=1000.0 KILL_LEVEL=6.8 tests= X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.2.107117 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- @Simon: Thanks, again. Could you please double check the link, I can't open it. @Matthieu Unfortunately, I'm not familiar with Erlang. I need to do this task on node.js with nano (https://github.com/dscape/nano). On 12-08-30 09:03 AM, Simon Metson wrote: > Sure, you can use _bulk_docs and send a json doc like: > > { > "docs": [ > {"_id": "expired_doc_0", "_rev": "1-62657917", "_deleted": true}, > {"_id": "expired_doc_1", "_rev": "1-2089673485", "_deleted": true}, > {"_id": "expired_doc_2", "_rev": "1-2063452834", "_deleted": true} > ] > } > > > http://wiki.apache.org/couchdb/HTTP_Bulk_Document_API#Modify_Multiple_Documents_With_a_Single_Request for more info > > > On Thursday, 30 August 2012 at 17:01, Stephan Bardubitzki wrote: > >> Thanks Simon, >> >> that's what I was thinking too, but have a problem to figure out how >> bulk delete should be implemented. Do you have some advise or code >> example on that? >> >> Stephan >> >> >> On 12-08-30 08:48 AM, Simon Metson wrote: >>> You need to have a view keyed by expire_date and an external process (some cron script, say) that queries that appropriately and makes the (bulk) delete of old docs. >>> Cheers >>> Simon >>> >>> >>> On Thursday, 30 August 2012 at 16:44, Stephan Bardubitzki wrote: >>> >>>> I have a db with docs that have a field expire_date. I want to auto >>>> delete those docs when expire_date has passed, but have no clue how to >>>> do that. >>>> >>>> Any advise would be greatly appreciated. >>>> >>>> Thanks, >>>> Stephan >>>> >>> >>> >>> -------------------------------- >>> Spam/Virus scanning by CanIt Pro >>> >>> For more information see >>> http://www.kgbinternet.com/SpamFilter.htm >>> >>> To control your spam filter, log in at >>> http://filter.kgbinternet.com >>> >> >> > > > -------------------------------- > Spam/Virus scanning by CanIt Pro > > For more information see > http://www.kgbinternet.com/SpamFilter.htm > > To control your spam filter, log in at > http://filter.kgbinternet.com >