Marcos Zanona created COUCHDB-1527:
--------------------------------------

             Summary: Embedded variables within strings for HTTP Rewrite 
Handler 
                 Key: COUCHDB-1527
                 URL: https://issues.apache.org/jira/browse/COUCHDB-1527
             Project: CouchDB
          Issue Type: New Feature
          Components: HTTP Interface
    Affects Versions: 1.2
            Reporter: Marcos Zanona
            Priority: Minor


When writing a rewrite condition it is not possible to replicate the same 
behaviour as for a view query like:

    _design/app/_view/search?startkey="word"&endkey="word\ufff0"

through rewrites it should be possible to achieve it with:

    _design/app/_rewrite/search/word

    {
        from: "search/:q",
        to: "_view/search",
        method: "GET",
        query: {
            startkey: ":q",
            endkey: ":q\ufff0"
        }
    }

although within the `endkey`, `:q` never evaluates because it's true form is 
`:q\ufff0`

I would suggest a ruby or mustache-like evaluation for this so we could perform 
such queries without problem like

    endkey: "{{:q}}\ufff0"

or
   
   endkey: "#{:q}\ufff0"

this is fair in the sense it's possible to achieve the same result available 
manually but through automated http rewriting.

Thanks

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to