Return-Path: Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: (qmail 10216 invoked from network); 23 Feb 2011 13:10:32 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 23 Feb 2011 13:10:32 -0000 Received: (qmail 58575 invoked by uid 500); 23 Feb 2011 13:10:30 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 58043 invoked by uid 500); 23 Feb 2011 13:10:27 -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 58023 invoked by uid 99); 23 Feb 2011 13:10:26 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 23 Feb 2011 13:10:26 +0000 X-ASF-Spam-Status: No, hits=2.2 required=5.0 tests=HTML_MESSAGE,NORMAL_HTTP_TO_IP,RCVD_IN_DNSWL_LOW,SPF_NEUTRAL,WEIRD_PORT X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) Received: from [209.85.161.52] (HELO mail-fx0-f52.google.com) (209.85.161.52) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 23 Feb 2011 13:10:21 +0000 Received: by fxm17 with SMTP id 17so3454791fxm.11 for ; Wed, 23 Feb 2011 05:09:59 -0800 (PST) MIME-Version: 1.0 Received: by 10.223.62.12 with SMTP id v12mr3181640fah.9.1298466586718; Wed, 23 Feb 2011 05:09:46 -0800 (PST) Received: by 10.223.156.193 with HTTP; Wed, 23 Feb 2011 05:09:46 -0800 (PST) Received: by 10.223.156.193 with HTTP; Wed, 23 Feb 2011 05:09:46 -0800 (PST) In-Reply-To: <7C344C6F-7E81-4F63-9D34-8297532A09EA@thenoi.se> References: <9049EE9C-487E-40D0-AFE1-AB1BC81336B3@thenoi.se> <7C344C6F-7E81-4F63-9D34-8297532A09EA@thenoi.se> Date: Wed, 23 Feb 2011 14:09:46 +0100 Message-ID: Subject: Re: View error: "Document is missing attachment" From: =?UTF-8?Q?Szekeres_Istv=C3=A1n?= To: user@couchdb.apache.org Content-Type: multipart/alternative; boundary=0015174029fca7742c049cf2cf51 --0015174029fca7742c049cf2cf51 Content-Type: text/plain; charset=UTF-8 also in your emit function you probably want doc._id instead of doc.id. On Feb 23, 2011 1:44 PM, "Martin Hewitt" wrote: > Found my issue, couldn't see the wood for the trees! > > I was missing _view in the URL: > > http://127.0.0.1:5984/test-site_list/_design/blah/enabled > > vs > > http://127.0.0.1:5984/test-site_list/_design/blah/_view/enabled > > Martin > > On 23 Feb 2011, at 12:36, Martin Hewitt wrote: > >> Hi all, >> >> I'm having issues with the above error message on an empty database. >> >> My View is: >> >> { >> "_id": "_design/blah", >> "_rev": "2-0f45e5f3daa692c830fe40b609568356", >> "views": { >> "enabled": { >> "map": "function(doc) { if (doc.enabled == true) emit(doc.id, doc.id) }" >> } >> } >> } >> >> When I load the view from: >> http://127.0.0.1:5984/test-site_list/_design/blah/enabled >> >> I get the error: >> {"error":"not_found","reason":"Document is missing attachment"} >> >> Even if I add a sample document: >> { >> "_id": "24f48089f196be70266b54edc0004104", >> "_rev": "1-94d2179287be1b04d301d6a63bace879", >> "value": "one", >> "enabled": true >> } >> >> I get the error. >> >> My CouchDB version is: >> 1> Apache CouchDB 1.0.2 (LogLevel=info) is starting. >> 1> Apache CouchDB has started. Time to relax. >> >> Any help would be hugely appreciated. >> >> Thanks, >> >> Martin > --0015174029fca7742c049cf2cf51--