commit | 7cfabb5543de52639d226f509897e9b418327fcb | [log] [tgz] |
---|---|---|
author | Nick Vatamaniuc <vatamane@gmail.com> | Thu Jun 02 17:16:33 2016 -0400 |
committer | Nick Vatamaniuc <vatamane@apache.org> | Thu Oct 13 23:03:18 2016 -0400 |
tree | 5d1ce58416222b5647febd979fa5a1a8cb182974 | |
parent | 508122c52731a9eac3e83f8d727f2355f019fe1f [diff] |
Add optional `fields` to change feed selectors When using selectors with `include_docs=true` can specify an optional fields array in the POST request JSON body. Each element in the array can be a json field (or even a key path specified as field1.field2...). Resulting documents will contain only the specified document fields. For example: ``` http://.../d1/_changes?filter=_selector&include_docs=true { "selector": {"z" : {"$gte" : 1} }, "fields": ["field1", "field2"] } ``` Will first select only document with "z" value >= 1, then will return only field1 and field2 in documents. ```{ "field1": "field1value", "field2": "field2value"}``` (This is a companion pr. Main pr is in couch repo) Jira: COUCHDB-2988
Fabric is a collection of proxy functions for CouchDB operations in a cluster. These functions are used in CouchDB as the remote procedure endpoints on each of the cluster nodes.
For example, creating a database is a straightforward task in CouchDB 1.x, but for a clustered CouchDB, each node that will store a shard for the database needs to receive and execute a fabric function. The node handling the request also needs to compile the results from each of the nodes and respond accordingly to the client.
Fabric is used in conjunction with ‘Rexi’ which is also an application within CouchDB.
Fabric requires R13B03 or higher and can be built with rebar.