1
1
node-red-node-cf-cloudant
2
2
=========================
3
- A [ Node-RED] ( http://nodered.org ) node to ` insert ` , ` update ` and ` delete ` documents
3
+ A pair of [ Node-RED] ( http://nodered.org ) nodes to work with documents
4
4
in a [ Cloudant] ( http://cloudant.com ) database that is integrated with
5
5
[ IBM Bluemix] ( http://bluemix.net ) .
6
6
@@ -13,13 +13,20 @@ npm install node-red-node-cf-cloudant
13
13
14
14
Usage
15
15
-----
16
- Allows basic access to a [ Cloudant] ( http://cloudant.com ) database. Currently
17
- it only have one node that supports ` insert ` , ` update ` and ` delete `
18
- operations.
16
+ Allows basic access to a [ Cloudant] ( http://cloudant.com ) database to
17
+ ` insert ` , ` update ` , ` delete ` and ` search ` for documents.
19
18
20
19
To ** insert** a new document into the database you have the option to store
21
20
the entire ` msg ` object or just the ` msg.payload ` . If the input value is not
22
21
in JSON format, it will be transformed before being stored.
23
22
24
23
For ** update** and ** delete** , you must pass the ` _id ` and the ` _rev ` as part
25
24
of the input ` msg ` object.
25
+
26
+ To ** search** for a document you have two options: get a document directly by
27
+ its ` _id ` or use an existing [ search index] ( https://cloudant.com/for-developers/search/ )
28
+ from the database. For both cases, the query should be passed in the
29
+ ` msg.payload ` input object as a string.
30
+
31
+ When getting documents by id, the ` payload ` will be the desired ` _id ` value.
32
+ For ` search indexes ` , the query should follow the format ` indexName:value ` .
0 commit comments