Tagging
This commit is contained in:
parent
e5334cc5e7
commit
3e24bbd22f
@ -3,6 +3,51 @@ var nano = require('nano')('http://localhost:5984');
|
||||
var db_name = 'keeper';
|
||||
var keeper = nano.use(db_name);
|
||||
|
||||
alice.destroy('_design/titles', function(err, body) {
|
||||
if (!err)
|
||||
console.log(body);
|
||||
});
|
||||
alice.destroy('_design/reducedView', function(err, body) {
|
||||
if (!err)
|
||||
console.log(body);
|
||||
});
|
||||
alice.destroy('_design/taglist', function(err, body) {
|
||||
if (!err)
|
||||
console.log(body);
|
||||
});
|
||||
alice.destroy('_design/getAllTags', function(err, body) {
|
||||
if (!err)
|
||||
console.log(body);
|
||||
});
|
||||
alice.destroy('_design/getTagByKey', function(err, body) {
|
||||
if (!err)
|
||||
console.log(body);
|
||||
});
|
||||
|
||||
keeper.insert(
|
||||
{
|
||||
"views": {
|
||||
"titles": {
|
||||
"map": function (doc) { emit(null, doc.title); }
|
||||
}
|
||||
}
|
||||
}, '_design/titles', function (error, response) {
|
||||
console.log("_design/titles added");
|
||||
});
|
||||
|
||||
keeper.insert(
|
||||
{
|
||||
"views": {
|
||||
"reducedView": {
|
||||
"map": function (doc) { emit(null, [doc.title, doc.reduced]); }
|
||||
}
|
||||
}
|
||||
}, '_design/reducedView', function (error, response) {
|
||||
console.log("_design/reducedView added");
|
||||
});
|
||||
|
||||
|
||||
|
||||
keeper.insert(
|
||||
{
|
||||
"views": {
|
||||
|
Loading…
Reference in New Issue
Block a user