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