From user-return-26332-apmail-couchdb-user-archive=couchdb.apache.org@couchdb.apache.org Sat Nov 30 15:26:14 2013 Return-Path: X-Original-To: apmail-couchdb-user-archive@www.apache.org Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 2565210690 for ; Sat, 30 Nov 2013 15:26:14 +0000 (UTC) Received: (qmail 62696 invoked by uid 500); 30 Nov 2013 15:26:09 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 62665 invoked by uid 500); 30 Nov 2013 15:26:08 -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 62651 invoked by uid 99); 30 Nov 2013 15:26:05 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 30 Nov 2013 15:26:05 +0000 X-ASF-Spam-Status: No, hits=2.2 required=5.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) Received: from [62.113.250.122] (HELO mail.orlives.de) (62.113.250.122) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 30 Nov 2013 15:25:59 +0000 Received: from arschbook.localnet (p5DD62644.dip0.t-ipconnect.de [93.214.38.68]) by mail.orlives.de (Postfix) with ESMTPSA id C0CF852E14EB for ; Sat, 30 Nov 2013 16:25:38 +0100 (CET) From: Oliver Schmidt To: user@couchdb.apache.org Subject: Re: Rewriting query keys Date: Sat, 30 Nov 2013 16:27:08 +0100 Message-ID: <2891306.TSHyMepkIj@arschbook> User-Agent: KMail/4.11.3 (Linux/3.12.1-1-ARCH; KDE/4.11.3; x86_64; ; ) In-Reply-To: References: <15065551.sG713Z5ONP@arschbook> <13215746.EgnY3Ama9A@arschbook> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart2335667.DCfb0mAJRt"; micalg="pgp-sha1"; protocol="application/pgp-signature" X-Virus-Checked: Checked by ClamAV on apache.org --nextPart2335667.DCfb0mAJRt Content-Type: multipart/alternative; boundary="nextPart4183740.zRcnL9Zpyn" Content-Transfer-Encoding: 7Bit This is a multi-part message in MIME format. --nextPart4183740.zRcnL9Zpyn Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Am Samstag, 30. November 2013, 15:12:35 schrieb Martin Higham: > If you could provide the code for the view you are using then it would be > easier to supply the rewrite you need > Here's the code: https://github.com/schmittlauch/recipecouch/tree/taglist/lib The rewrite rule not working is {from: '/tags/:tag', to: '_list/testList/tags', query: { reduce: false, key: ":tag"}}, It works great if I directly give the querykey to the list function with http://localhost:5984/recipes/_design/recipe-couch/_rewrite/_db/_design/recipe-couch/_list/testList/tags?key=%22fish%22&reduce=false but if I want to use it with the rewrite URL http://localhost:5984/recipes/_design/recipe-couch/_rewrite/tags/ad it now responds with {"error":"unknown_error","reason":"badarg"} Btw, if you want to deploy this couchapp you need http://kan.so/ Big thanks in advance, Oliver --nextPart4183740.zRcnL9Zpyn Content-Transfer-Encoding: 7Bit Content-Type: text/html; charset="us-ascii"

Am Samstag, 30. November 2013, 15:12:35 schrieb Martin Higham:

> If you could provide the code for the view you are using then it would be

> easier to supply the rewrite you need

>

 

Here's the code: https://github.com/schmittlauch/recipecouch/tree/taglist/lib

The rewrite rule not working is {from: '/tags/:tag', to: '_list/testList/tags', query: { reduce: false, key: ":tag"}},

 

It works great if I directly give the querykey to the list function with http://localhost:5984/recipes/_design/recipe-couch/_rewrite/_db/_design/recipe-couch/_list/testList/tags?key=%22fish%22&reduce=false but if I want to use it with the rewrite URL http://localhost:5984/recipes/_design/recipe-couch/_rewrite/tags/ad it now responds with {"error":"unknown_error","reason":"badarg"}

Btw, if you want to deploy this couchapp you need http://kan.so/

 

Big thanks in advance, Oliver

--nextPart4183740.zRcnL9Zpyn-- --nextPart2335667.DCfb0mAJRt Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part. Content-Transfer-Encoding: 7Bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (GNU/Linux) iQIcBAABAgAGBQJSmgPWAAoJEMTRts8jlTP3WZIQAIzbei1ruF1yv+GaxPIjWcvh svMkefbxD4WnZFjVJ5Nk8L2ARh+i0PRod51+P6jivkvkXDS9JLHrmRYw1VVPktNU FZFHH5cZLF3U2s/EP6m47gsoSk4NxyXUxq/l9mxUYUrvsH4zqoCsz5ZZZeVP+Y3X tzKvUSs3zmP2WCv32gsNg1D/8mkH+SjpOiIwNL/yovbVkwK2vee8GE2BgF4Ra0Dc yjFDBdmzCL96b4CMMiZsdBgD2cOQCT8GSNF3qE+RsSUUWoxDVhhiGoIBnl1KvEsb sVkI9g1chSMxl4lhDmQ/z4MZtAj+YD/9EjqoD/jRqShJ9Usk+VoJTdXZaYJEW+9Y dTHQyPC1VS56DrtqknaBbqRqtVp2aHwLJ7LKORb/p89TwCDu4TeIejm412Wi1UyV U0znoBdcU6Ip42GJTxBtlNHEq0BIFLZBTZKVpbeQeoXVa2Dc8mbTlt6VL5BpP1Qq DbX42gZPuQG1jd0fGvWYiIl2EZ0+zNviI8rTgn3DSHdmOIydvDrlQ28q6f+00aX9 1mbltb0Hoqeujt/q49Yo1VIeTG0yEbUtfzmpftKYA6Fb6OR5EvK2iHf89YCSJKBy EccMc3JF3fd5WSLSsZ/BgdNyAGCqSF5ukw1V+5GE+giM7yz72iJXEJf2fKyUIH+L pGS5DkXpVo1dp1PTbCln =makm -----END PGP SIGNATURE----- --nextPart2335667.DCfb0mAJRt--