couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Szekeres István <szeke...@iii.hu>
Subject Re: View error: "Document is missing attachment"
Date Wed, 23 Feb 2011 13:09:46 GMT
also in your emit function you probably want doc._id instead of doc.id.
On Feb 23, 2011 1:44 PM, "Martin Hewitt" <martin@thenoi.se> 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
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message