3
我按照说明在这里单功能添加到我的CouchDB: http://guide.couchdb.org/draft/transforming.html如何添加列表功能到蒲团?
当我访问对应列表功能的URL,我得到的消息:
{"error":"not_found","reason":"missing_named_view"}
这里是对应列表功能网址我已经构造:
edtalmadge.iriscouch.com/burritohunter/_design/export/_list/bar/locations
这里是文档中给出的网址:
/DB/_design /富/ _list /列表名称/视图名称
我在做什么错?
这是我迄今所做的:
增加的视图文件被褥:
{"_id": "_design/locations", "_rev": "16-c0702b81430f6b0d428c7a3e201dfc15", "language": "javascript", "views": { "locations": { "map": "function(doc) { if(doc.type == 'location') {emit(null, { 'name': doc.name, 'address': doc.address, 'geolocation': doc.geolocation, 'phone': doc.phone, 'open_24': doc.open_24, 'beer': doc.beer, 'rating': doc.rating, 'type': doc.type }); } }" } }}
添加列表文件被褥:
{"_id": "_design/export", "_rev": "2-99c7be486f53d56926a8dc890e182d01", "lists": { "bar": "function(head, req) { var row; while (row = getRow()) { return 'foo' } }", "zoom": "function() { return 'zoom!' }" }}
哇,我试了一百万不同的方式,没有运气。谢谢你的好解释。非常感激。 – edt