You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@couchdb.apache.org by "Adam Kocoloski (JIRA)" <ji...@apache.org> on 2013/05/29 22:36:21 UTC

[jira] [Updated] (COUCHDB-886) Add option to set query options, defined in rewrites.json, as default

     [ https://issues.apache.org/jira/browse/COUCHDB-886?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Adam Kocoloski updated COUCHDB-886:
-----------------------------------

    Issue Type: Improvement  (was: Bug)

Not a Bug.
                
> Add option to set query options, defined in rewrites.json, as default
> ---------------------------------------------------------------------
>
>                 Key: COUCHDB-886
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-886
>             Project: CouchDB
>          Issue Type: Improvement
>          Components: Database Core
>            Reporter: Henrik Skupin
>            Assignee: Benoit Chesneau
>
> With the latest version of CouchDB the URL parameters are not taken into account when the rewrites.json file specifies the same ones for the appropriate entry. See the following example:
>   {
>     "from" : "/general/reports",
>     "to" : "_list/general_reports/general_reportsByDate",
>     "query" : {
>       "descending" : true,
>       "limit" : 51
>     }
>   }
> default values: http://mozmill.hskupin.info/general/reports
> custom values: http://mozmill.hskupin.info/general/reports?limit=10
> Whether which URL you are loading, the values from rewrites.json are always used. Once the limit entry gets removed from that file, the URL parameter is used and 10 rows are displayed.
> As proposed by Benoit query entries should be explicitly allowed to have a default value. Otherwise the value from rewrites.json has the priority.
> "query": {
>  "key": { "value": ":var", "default": 1}
> }
> Can true be used instead of a number? It could be confusing this way, especially when the value is also a number.

--
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