Return-Path: Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: (qmail 93528 invoked from network); 3 Apr 2011 19:45:22 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 3 Apr 2011 19:45:22 -0000 Received: (qmail 2392 invoked by uid 500); 3 Apr 2011 19:45:21 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 2361 invoked by uid 500); 3 Apr 2011 19:45:21 -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 2348 invoked by uid 99); 3 Apr 2011 19:45:21 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 03 Apr 2011 19:45:20 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=5.0 tests=RCVD_IN_DNSWL_NONE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of deistlr@me.com designates 17.148.16.96 as permitted sender) Received: from [17.148.16.96] (HELO asmtpout021.mac.com) (17.148.16.96) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 03 Apr 2011 19:45:13 +0000 MIME-version: 1.0 Content-transfer-encoding: 7BIT Content-type: text/plain; CHARSET=US-ASCII Received: from [10.0.1.5] ([74.95.22.187]) by asmtp021.mac.com (Oracle Communications Messaging Exchange Server 7u4-20.01 64bit (built Nov 21 2010)) with ESMTPSA id <0LJ3003FZDIAAD10@asmtp021.mac.com> for user@couchdb.apache.org; Sun, 03 Apr 2011 12:44:36 -0700 (PDT) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:5.2.15,1.0.148,0.0.0000 definitions=2011-04-03_06:2011-04-02,2011-04-03,1970-01-01 signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 ipscore=0 suspectscore=1 phishscore=0 bulkscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx engine=6.0.2-1012030000 definitions=main-1104030087 From: Deistl Ross Subject: rewrite startkey endkey Date: Sun, 03 Apr 2011 15:44:33 -0400 Message-id: <6E01F18F-8F28-4BCE-92AB-8AEBE288A1FF@me.com> To: user@couchdb.apache.org X-Mailer: Apple Mail (2.1084) After searching various sources I can't find a solution, or I don't understand. If have a string "endkey=%22471345585383%22&startkey=%22471345585383%22&descending=true" when sent to the appropriate _view yields the expected result. I create this rewrite, "from": "/stufffixq/:val", "to": "_view/test6", "method": "GET", "descending": "TRUE", "query": { "endkey": [":val"], "startkey": [":val",{}] This string does not work, producing this response, /_view/test6?endkey=%5B%22endkey%3D%5C%22471345585385%5C%22%26startkey%3D%5C%22471345585383%5C%22%22%5D&startkey=%5B%22endkey%3D%5C%22471345585385%5C%22%26startkey%3D%5C%22471345585383%5C%22%22%2C%7B%7D%5D&val=endkey%3D%22471345585385%22%26startkey%3D%22471345585383%22 200 This response ignores the start and end keys and returns all the results for the _view. The non-rewrite request show this response, _view/test6?endkey=%22471345585383%22&startkey=%22471345585383%22&descending=true 200 And returns the correct results How should the rewrite be written to produce the correct result?