couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Marcos Zanona (JIRA)" <j...@apache.org>
Subject [jira] [Created] (COUCHDB-1527) Embedded variables within strings for HTTP Rewrite Handler
Date Mon, 27 Aug 2012 10:15:07 GMT
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

Mime
View raw message