couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Brian Candler (JIRA)" <j...@apache.org>
Subject [jira] Commented: (COUCHDB-573) Regex capture problem in emit functions
Date Sat, 21 Nov 2009 07:41:40 GMT

    [ https://issues.apache.org/jira/browse/COUCHDB-573?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12780929#action_12780929
] 

Brian Candler commented on COUCHDB-573:
---------------------------------------

BTW I got an "Internal Server Error" from JIRA when adding that comment, although the comment
does seem to have attached itself successfully.

> Regex capture problem in emit functions
> ---------------------------------------
>
>                 Key: COUCHDB-573
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-573
>             Project: CouchDB
>          Issue Type: Bug
>    Affects Versions: 0.11
>         Environment: Linux
>            Reporter: Eric Desgranges
>            Priority: Trivial
>             Fix For: 0.11
>
>
> The capture variables $0, $1, $2... don't get instantiated in regex expressions placed
in emit functions.
> Example:
> function(doc) { if (doc.EntityType != null) { emit(doc.ID.Value + '.' + doc.EntityType,
{ Type: doc.EntityType.replace(/[A-Z]/g, ' $0'), ....
> EntityType: TestTwo 
> Returns:
> Type: " $0est $0wo" 
> Instead of:
> Type: " Test Two" 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message