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 9B196D2D7 for ; Tue, 18 Sep 2012 16:57:50 +0000 (UTC) Received: (qmail 21807 invoked by uid 500); 18 Sep 2012 16:57:48 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 21777 invoked by uid 500); 18 Sep 2012 16:57:48 -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 21769 invoked by uid 99); 18 Sep 2012 16:57:48 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 18 Sep 2012 16:57:48 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=FSL_RCVD_USER,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of carl.bourne@me.com designates 17.158.236.239 as permitted sender) Received: from [17.158.236.239] (HELO nk11p04mm-asmtp004.mac.com) (17.158.236.239) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 18 Sep 2012 16:57:44 +0000 MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Received: from [192.168.1.66] (host86-132-27-21.range86-132.btcentralplus.com [86.132.27.21]) by nk11p04mm-asmtp004.mac.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Jan 3 2012)) with ESMTPSA id <0MAK00G471RBJD50@nk11p04mm-asmtp004.mac.com> for user@couchdb.apache.org; Tue, 18 Sep 2012 16:57:14 +0000 (GMT) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:5.7.7855,1.0.431,0.0.0000 definitions=2012-09-18_06:2012-09-18,2012-09-18,1970-01-01 signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 ipscore=0 suspectscore=0 phishscore=0 bulkscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=6.0.2-1203120001 definitions=main-1209180112 References: <91593B54-D63F-47A6-BB7F-0B176D705C78@me.com> <2D482DCE-31A8-495F-B484-A484F92FA5D0@couchbase.com> In-reply-to: <2D482DCE-31A8-495F-B484-A484F92FA5D0@couchbase.com> Content-transfer-encoding: quoted-printable Message-id: <8FD82E78-16BA-49AC-8D5E-E8C477FEEBFD@me.com> Cc: "user@couchdb.apache.org" X-Mailer: iPhone Mail (10A403) From: Carl Bourne Subject: Re: Exclude documents from view based on list of regex expressions Date: Tue, 18 Sep 2012 17:57:12 +0100 To: "user@couchdb.apache.org" X-Virus-Checked: Checked by ClamAV on apache.org Thanks for the advice Jens! I'm fairly new to Couch any chance of a simple example that shows how to bui= ld this type of map function?=20 Regards, Carl Carl Bourne | Senior Sales Engineer | mobile: +44 (0) 7770 284294 | www.vena= fi.com On 18 Sep 2012, at 17:40, Jens Alfke wrote: >=20 > On Sep 18, 2012, at 8:51 AM, Carl Bourne > wrote: >=20 > Whats the best approach for excluding documents from a view based on a lis= t of regex expressions. For example I want to exclude anything where doc.iss= ue.name contains a value that matches a list of regex expressions. >=20 > The map function should contain an array of regexes, and match the doc.iss= ue.name against each one in turn. If it matches any of them, just return, el= se emit whatever the appropriate key/value are. >=20 > =E2=80=94Jens