Return-Path: Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: (qmail 40537 invoked from network); 12 Sep 2010 17:17:09 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 12 Sep 2010 17:17:09 -0000 Received: (qmail 51883 invoked by uid 500); 12 Sep 2010 17:17:08 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 51706 invoked by uid 500); 12 Sep 2010 17:17:07 -0000 Mailing-List: contact user-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@couchdb.apache.org Delivered-To: mailing list user@couchdb.apache.org Received: (qmail 51697 invoked by uid 99); 12 Sep 2010 17:17:07 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 12 Sep 2010 17:17:07 +0000 X-ASF-Spam-Status: No, hits=0.7 required=10.0 tests=RCVD_IN_DNSWL_NONE,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) Received: from [74.125.83.180] (HELO mail-pv0-f180.google.com) (74.125.83.180) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 12 Sep 2010 17:16:59 +0000 Received: by pvc30 with SMTP id 30so5227368pvc.11 for ; Sun, 12 Sep 2010 10:16:38 -0700 (PDT) Received: by 10.142.50.17 with SMTP id x17mr768458wfx.163.1284311798268; Sun, 12 Sep 2010 10:16:38 -0700 (PDT) Received: from [10.0.1.2] (c-24-130-240-73.hsd1.ca.comcast.net [24.130.240.73]) by mx.google.com with ESMTPS id s34sm7246511wfc.8.2010.09.12.10.16.36 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sun, 12 Sep 2010 10:16:37 -0700 (PDT) Sender: J Chris Anderson Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Apple Message framework v1081) Subject: Re: Query parameters in rewrites.json not handled as default values From: J Chris Anderson In-Reply-To: Date: Sun, 12 Sep 2010 10:16:35 -0700 Content-Transfer-Encoding: quoted-printable Message-Id: <2714FE12-54B0-4CBF-8F9A-2F66FD944991@apache.org> References: To: user@couchdb.apache.org X-Mailer: Apple Mail (2.1081) On Sep 12, 2010, at 9:00 AM, Benoit Chesneau wrote: > On Sun, Sep 12, 2010 at 5:43 PM, Henrik Skupin = wrote: >> On Sun, Sep 12, 2010 at 4:08 AM, Benoit Chesneau = wrote: >>=20 >>>=20 >>> Well it will be a regression then. It has worked like this, and = after >>> your request, we discussed about changed it . The point is that you >>> didn't want that someone can override values defined in the ddoc and = I >>> think you had a case for this. >>>=20 >>> I'm not sure what is the right way to handle it right now and we >>> should consider all the usecases before changing anything. >>>=20 >>=20 >> I'm happy to file a bug report but I agree. If that behavior has been >> changed on purpose, it would be good to know the reasons. Do you have = the >> bug # or the changeset, which has been changed this behavior, so we = have a >> reference point? >>=20 >> -- >> Henrik Skupin >> QA Engineer >> Mozilla Corporation >>=20 >=20 > I thas been discussed on pre-release cycle unfortunatly :/ But If I > remember the question about using query as a default or a way to fix > variable was around the question : "How do we make sure the > startkey/endkey for this path aren't rewritten?". Which is I think a > good question. =46rom time to time you want to make sure that the path > /key is always the patch routing the key for this list. or /about go > to a doc with some id. >=20 > Instead of using query for the defaults, I would suggest to introduce > a `default` member to the rule or maybe a way to set as a default > value in the query like : >=20 > "query": { > "key": { "default": 1, "value": ":var"} > } >=20 > I've a preference for a `default`member though, it eases the code imo. >=20 yes I agree default is easier (and also backwards compatible to just = leave the existing query definition alone). Chris > - benoit