forked from rvennam/openwhisk-darkvisionapp-1
-
Notifications
You must be signed in to change notification settings - Fork 0
/
cloudant-designs.json
40 lines (40 loc) · 1.47 KB
/
cloudant-designs.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
{
"docs": [
{
"_id": "_design/images",
"views": {
"all": {
"map": "function (doc) {\n if (doc.type == \"image\") {\n emit(doc._id, 1);\n }\n}"
},
"by_video_id": {
"map": "function (doc) {\n if (doc.type == \"image\" && doc.video_id) {\n emit(doc.video_id, 1);\n }\n}"
},
"to_be_analyzed": {
"map": "function (doc) {\n if (doc.type == \"image\" && !doc.analysis) {\n emit(doc._id, 1);\n }\n}"
},
"processed_by_video_id": {
"map": "function (doc) {\n if (doc.type == \"image\" && doc.video_id && doc.analysis) {\n emit(doc.video_id, 1);\n }\n}",
"reduce": "_sum"
},
"total_by_video_id": {
"reduce": "_sum",
"map": "function (doc) {\n if (doc.type == \"image\" && doc.video_id) {\n emit(doc.video_id, 1);\n }\n}"
},
"standalone": {
"map": "function (doc) {\n if (doc.type == \"image\" && !doc.video_id) {\n emit(doc._id, 1);\n }\n}"
}
}
},
{
"_id": "_design/videos",
"views": {
"all": {
"map": "function (doc) {\n if (doc.type == \"video\") {\n emit(doc._id, { source: doc.source, title: doc.title});\n }\n}"
},
"to_be_analyzed": {
"map": "function (doc) {\n if (doc.type == \"video\" && !doc.metadata) {\n emit(doc._id, { source: doc.source, title: doc.title});\n }\n}"
}
}
}
]
}