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 E414F103F8 for ; Tue, 8 Oct 2013 10:41:19 +0000 (UTC) Received: (qmail 13610 invoked by uid 500); 8 Oct 2013 10:41:17 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 13265 invoked by uid 500); 8 Oct 2013 10:41:16 -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 13245 invoked by uid 99); 8 Oct 2013 10:41:14 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 08 Oct 2013 10:41:14 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS,T_FILL_THIS_FORM_SHORT X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of eugene.khrustalev@gmail.com designates 209.85.212.169 as permitted sender) Received: from [209.85.212.169] (HELO mail-wi0-f169.google.com) (209.85.212.169) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 08 Oct 2013 10:41:10 +0000 Received: by mail-wi0-f169.google.com with SMTP id hj3so6709185wib.0 for ; Tue, 08 Oct 2013 03:40:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; bh=d/Qx4sJj9SgnLSSw5GaXvOzf0yPsLpFQ0hScTvLMqi0=; b=NGR51XFIZXMsNNbcZuaWZza8vnqn1qpCwIaUuAKrafmYg3Nx8SSrwHwPZm8PFbOrXU pfmFSV3REyjUxA1OZCG+Wtbytg0NAx4qaZYxeFmZr+XBx5PUYpACmXGvpp7HaBrUy4FD of0QZL4FvldVfo6H8WnrxzXpZJOKnKqxhRiW09NrXmGz6qUQnuyQdu7FvjFlJTkciMC6 JtQOMFsQz8mqtqjxhpx2VV66kRyqcQDRdTFWcVQdUq4aNyOsB3t2dBUCTom8XtmGFdUS F74rsF/Q/4wI3p8BloweS2KdR6GsjPReU1GUaSB0ShhHn+E8HE9o+pHWXyNZUij7QegF jQTw== X-Received: by 10.180.187.2 with SMTP id fo2mr22965401wic.65.1381228849139; Tue, 08 Oct 2013 03:40:49 -0700 (PDT) MIME-Version: 1.0 Received: by 10.180.189.169 with HTTP; Tue, 8 Oct 2013 03:40:29 -0700 (PDT) In-Reply-To: <1381227654.12147.YahooMailNeo@web121003.mail.ne1.yahoo.com> References: <1381227654.12147.YahooMailNeo@web121003.mail.ne1.yahoo.com> From: =?UTF-8?B?0KXRgNGD0YHRgtCw0LvQtdCyINCV0LLQs9C10L3QuNC5?= Date: Tue, 8 Oct 2013 14:40:29 +0400 Message-ID: Subject: Re: usrname ppassword To: user@couchdb.apache.org, Ashraf Janan Content-Type: multipart/alternative; boundary=001a11c38c82e8250504e838662b X-Virus-Checked: Checked by ClamAV on apache.org --001a11c38c82e8250504e838662b Content-Type: text/plain; charset=KOI8-R Content-Transfer-Encoding: quoted-printable Your map function wont be called when you send request to the couchdb. Couchdb calls it earlier. Your map function can be: function(doc) { if(doc.type =3D=3D=3D "student") { emit(doc.name + "_" + doc.password, doc) } } and your request: http://url/DB name/_design/name of design doc/_view/?key=3Dname_pass 2013/10/8 Ashraf Janan > Hi sir, > I tried to send request to couchDb, to get the id for a user, > I did the following: > > http://url/DB name/_design/name of design > doc/_view/?studentname=3Dname&password=3Dpass > > function(doc) { > if(doc.type =3D=3D=3D "student") > emit({studentname:name,password:doc.password}, doc); > } > > What is the wrong ?please > > Best wishes > Ashraf --=20 -- =F3 =D5=D7=C1=D6=C5=CE=C9=C5=CD, =E8=D2=D5=D3=D4=C1=CC=C5=D7 =E5=D7=C7=C5=CE=C9=CA --001a11c38c82e8250504e838662b--