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
1 file changed
tree: 5d1ce58416222b5647febd979fa5a1a8cb182974
  1. include/
  2. priv/
  3. src/
  4. .travis.yml
  5. LICENSE
  6. README.md
  7. rebar.config
README.md

fabric

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.

Getting Started

Fabric requires R13B03 or higher and can be built with rebar.

License

Apache 2.0