Return-Path: Delivered-To: apmail-couchdb-dev-archive@www.apache.org Received: (qmail 71088 invoked from network); 14 Sep 2010 20:01:57 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 14 Sep 2010 20:01:57 -0000 Received: (qmail 11621 invoked by uid 500); 14 Sep 2010 20:01:57 -0000 Delivered-To: apmail-couchdb-dev-archive@couchdb.apache.org Received: (qmail 11379 invoked by uid 500); 14 Sep 2010 20:01:56 -0000 Mailing-List: contact dev-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@couchdb.apache.org Delivered-To: mailing list dev@couchdb.apache.org Received: (qmail 11371 invoked by uid 99); 14 Sep 2010 20:01:56 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 14 Sep 2010 20:01:56 +0000 X-ASF-Spam-Status: No, hits=-1997.7 required=10.0 tests=ALL_TRUSTED,URI_NO_WWW_INFO_CGI X-Spam-Check-By: apache.org Received: from [140.211.11.22] (HELO thor.apache.org) (140.211.11.22) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 14 Sep 2010 20:01:54 +0000 Received: from thor (localhost [127.0.0.1]) by thor.apache.org (8.13.8+Sun/8.13.8) with ESMTP id o8EK1YG2023006 for ; Tue, 14 Sep 2010 20:01:34 GMT Message-ID: <30066921.187411284494494382.JavaMail.jira@thor> Date: Tue, 14 Sep 2010 16:01:34 -0400 (EDT) From: "Benoit Chesneau (JIRA)" To: dev@couchdb.apache.org Subject: [jira] Commented: (COUCHDB-886) Add option to set query options, defined in rewrites.json, as default In-Reply-To: <183235.146831284354191622.JavaMail.jira@thor> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/COUCHDB-886?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12909414#action_12909414 ] Benoit Chesneau commented on COUCHDB-886: ----------------------------------------- ok. will provide the patch in the week. > 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: Bug > 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. - You can reply to this email to add a comment to the issue online.