Skip to content

Conversation

@ptitzler
Copy link
Contributor

@ptitzler ptitzler commented Sep 7, 2016

Sample output.

{
  "status_date": "Wed Sep 07 2016 13:23:30 GMT-0700 (Pacific Daylight Time)",
  "status": {
    "initialized": true,
    "copied": 0,
    "failed": 0,
    "filtered": 0,
    "last_change_received": null,
    "last_change_applied": null,
    "last_update_seq": 0,
    "filter": {
      "server": {
        "name": "troubleshooting/recent_boston",
        "definition": "function(doc, req) {if (doc.properties && doc.properties.source && doc.properties.source === 'Boston') {var thedate = new Date();thedate.setDate(thedate.getDate() - 7);return doc.properties.timestamp >= thedate.valueOf();}return false;}"
      },
      "client": {
        "name": "sample_filter_functions/ignore_deleted_documents.js",
        "definition": "function (change) {\r\n\tif((! change) || (change.deleted)) {\r\n\t\treturn false;\r\n\t}\r\n\telse {\r\n\t\treturn true;\r\n\t}\r\n}"
      }
    },
    "transformer": {
      "name": "sample_transform_functions/no_transformation.js",
      "definition": "function (doc) {\r\n\r\n\t// do nothing\r\n\t\r\n\treturn doc;\r\n}"
    }
  }
}
  • filter.server.name: If set, identifies the <design_doc/filter_name> that contains the filter being used by CouchDB to exclude documents from the change feed.
  • filter.server.definition: The source code for <design_doc/filter_name>.
  • filter.client.name: If set, identifies the file that contains the filter routine that is applied to all documents in the change feed.
  • filter.client.definition: The source code for filter.client.name.
  • transformer.name: If set, identifies the file that contains the transformation routine that is applied to all documents that have passed filter.client.name.
  • transformer.definition: The source code for transformer.name.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants