kristian nissen
kristian nissen

Reputation: 2907

CouchDB exits when querying a view

When I access /mydatabase/_design/assets/_view/all I'm getting the following error:

"{"error":"EXIT","reason":"{function_clause,\n [{couch_httpd,handle_db_request,\n [{mochiweb_request, ..."

This is my view document:

{
  "_id": "_design\/assets",
  "_rev": "4243492989",
  "language": "javascript",
  "views": {
    "all": {
      "map": "function(doc) { if (doc.type == 'asset') { emit(doc.name, doc); }}"
    }
  }
}

What am I missing here?

Upvotes: 1

Views: 804

Answers (1)

Troy J. Farrell
Troy J. Farrell

Reputation: 1252

Kristian, your _id is fine. It looks like the error I saw when I used a query that didn't match the API. The view URLs changed in version 0.9. You probably want to upgrade to the new version of CouchDB anyway.

See also this question: CouchDB views erroring out

Upvotes: 1

Related Questions