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 B7ACC4AB8 for ; Sun, 15 May 2011 20:34:42 +0000 (UTC) Received: (qmail 65724 invoked by uid 500); 15 May 2011 20:34:41 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 65689 invoked by uid 500); 15 May 2011 20:34:41 -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 65679 invoked by uid 99); 15 May 2011 20:34:41 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 15 May 2011 20:34:41 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=FREEMAIL_FROM,HTML_MESSAGE,NORMAL_HTTP_TO_IP,RCVD_IN_DNSWL_LOW,RFC_ABUSE_POST,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL,WEIRD_PORT X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of alex.barbalex@gmail.com designates 209.85.212.52 as permitted sender) Received: from [209.85.212.52] (HELO mail-vw0-f52.google.com) (209.85.212.52) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 15 May 2011 20:34:33 +0000 Received: by vws16 with SMTP id 16so4217482vws.11 for ; Sun, 15 May 2011 13:34:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:date:x-google-sender-auth :message-id:subject:from:to:content-type; bh=HPadO6ob74Db93AoTBpqFSkC/4mtuDyYEQT08TdAiwU=; b=sAKQB19UhTpMybv4CRrNGpwy+o973RFzcyXbOOzke4DdqsMFuYCmyRVUvg69rWk3b/ jcRj4ryLmOjr+aj0Ne/SnqQk3evGRr/Cmmdxy6Zz7bVHDFx6mTUjViE+/YhtGQlU9D3f NN2YqDFVslyYGnL0oYrJmArhFRnB4fKWcUHyI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:date:x-google-sender-auth:message-id:subject :from:to:content-type; b=VyG0qkyGKWj5RovW/mYN4PUT9fVq9nf46vq03w39mKr62NB/cQcu/Q8iCdWJhmaS6p DJQsnrkSs+MBI66sIJp9Ki0OeSQFSKLVmpeaeS9P7VfbeLdQsnfGdHv+DH/olagIam+8 uZ3tJ8MAtrk0qRlkRBAWe4x/qRRPMSfOdUNgk= MIME-Version: 1.0 Received: by 10.52.177.104 with SMTP id cp8mr615001vdc.132.1305491652350; Sun, 15 May 2011 13:34:12 -0700 (PDT) Sender: alex.barbalex@gmail.com Received: by 10.52.158.42 with HTTP; Sun, 15 May 2011 13:34:12 -0700 (PDT) Date: Sun, 15 May 2011 22:34:12 +0200 X-Google-Sender-Auth: cQgOXMrfhM05o3cjcibW7VjXtdw Message-ID: Subject: fetching data: how to filter? From: Alexander Gabriel To: user@couchdb.apache.org Content-Type: multipart/alternative; boundary=20cf3071c8123212fa04a3567690 X-Virus-Checked: Checked by ClamAV on apache.org --20cf3071c8123212fa04a3567690 Content-Type: text/plain; charset=UTF-8 Hi I want to fetch documents from a CouchDb named evab. The documents include a field "Typ" and I want to fetch those with Typ = Beobachtung. So far I've tried: - curl -d "{\"Typ\":\"Beobachtung\"}" -X POST http://username:secretpassword@127.0.0.1:5984/evab/_bulk_docs?include_docs=true> Beobachtungen.json - curl -d "{\"docs\": [{\"Typ\":\"Beobachtung\"}]}" -X POST http://username:secretpassword@127.0.0.1:5984/evab/_all_docs?include_docs=true> Beobachtungen.json - replacing {\"Typ\":\"Beobachtung\"} or {\"docs\": [{\"Typ\":\"Beobachtung\"}]} with "@TypBeob_Kriterien.json" to circumvent problems with the windows-command-tool and " or '. I consistently get all the data of all the docs in the CouchDb. >From the documentation I have not understood: - _all_docs or _bulk_docs? It seems that both work the same. - Is ist maybe only possible to filter with keys = _id's? - Is it possible to fetch the data from a view? Or simply: What is the best way to do it? Thanks for help! Alexander Gabriel --20cf3071c8123212fa04a3567690--