couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Aurélien Bénel <>
Subject Re: Exclude documents from view based on list of regex expressions
Date Tue, 18 Sep 2012 17:17:14 GMT
Hi Jens,

>> If you need real regexes, I suppose you will need to build one huge regex containing
them all. 
> The map function should contain an array of regexes, and match the against
each one in turn. If it matches any of them, just return, else emit whatever the appropriate
key/value are.

Are you sure an array of regexes would be as efficient as a compound regex? Well, it's true
that with JavaScript you never know... I suppose the only way to figure it out is to try both
and take the faster.  

View raw message