FAQ
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

Search Discussions

  • Martin Hewitt at Feb 23, 2011 at 12:44 pm
    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
  • Szekeres István at Feb 23, 2011 at 1:10 pm
    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
  • Christian Polzer at Feb 23, 2011 at 3:37 pm
    Hello,

    the book "CouchDB in Action, Manning, by Chris Chandler" is listed on the wiki (http://wiki.apache.org/couchdb/FrontPage).

    As manning write on their website, it will not be published: http://www.manning.com/eernisse/

    Any idea why?
    Obsolete regarding the tremendous CouchDB documentation and the free book online?


    Regards,
    Chris
  • Stefan Matheis at Feb 23, 2011 at 3:45 pm
    *Quote*

    Dear CouchDB in Action MEAP customer,

    It has been a long time since the last update to the MEAP edition of
    CouchDB in Action, and we owe you an explanation! Writing technology
    books is a challenging process, and things don’t always go smoothly.
    Rapid changes to the CouchDB product and equally-rapid changes in the
    demands on our authors have resulted in no real progress for several
    months. We’re now taking a careful look at this project to decide
    whether we should move forward based on the existing content, start
    again from scratch, or cancel the book.

    We’ll let you know in a week or two what options you’ll have as a MEAP
    customer. We appreciate your patience.

    */Quote*
    From http://www.manning-sandbox.com/thread.jspa?threadID=35688
    On Wed, Feb 23, 2011 at 4:36 PM, Christian Polzer wrote:

    Hello,

    the book "CouchDB in Action, Manning, by Chris Chandler" is listed on the wiki (http://wiki.apache.org/couchdb/FrontPage).

    As manning write on their website, it will not be published: http://www.manning.com/eernisse/

    Any idea why?
    Obsolete regarding the tremendous CouchDB documentation and the free book online?


    Regards,
    Chris


Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupuser @
categoriescouchdb
postedFeb 23, '11 at 12:37p
activeFeb 23, '11 at 3:45p
posts5
users4
websitecouchdb.apache.org
irc#couchdb

People

Translate

site design / logo © 2018 Grokbase