Uploaded image for project: 'CouchDB'
  1. CouchDB
  2. COUCHDB-886

Add option to set query options, defined in rewrites.json, as default

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Won't Fix
    • None
    • None
    • Database Core
    • None
    • Regular Contributors Level (Easy to Medium)

    Description

      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.

      Attachments

        Activity

          People

            benoitc Benoit Chesneau
            whimboo Henrik Skupin
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: