5.4.1. Filtering

You can filter the contents of the changes feed in a number of ways. The most basic way is to specify one or more document IDs to the query. This causes the returned structure value to only contain changes for the specified IDs. Note that the value of this query argument should be a JSON formatted array.

You can also filter the _changes feed by defining a filter function within a design document. The specification for the filter is the same as for replication filters. You specify the name of the filter function to the filter parameter, specifying the design document name and filter name. For example:

GET /db/_changes?filter=design_doc/filtername

The _changes feed can be used to watch changes to specific document ID's or the list of _design documents in a database. If the filters parameter is set to _doc_ids a list of doc IDs can be passed in the doc_ids parameter as a JSON array.

For more information, see ???.