# File lib/chef/couchdb.rb, line 46 def create_id_map create_design_document( "id_map", { "version" => 1, "language" => "javascript", "views" => { "name_to_id" => { "map" => "function(doc) {\nemit([ doc.chef_type, doc.name], doc._id);\n}\n" }, "id_to_name" => { "map" => "function(doc) {\nemit(doc._id, [ doc.chef_type, doc.name ]);\n}\n" } } } ) end