You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by va...@apache.org on 2016/10/19 01:00:59 UTC
[1/3] documentation commit: updated refs/heads/master to 1957f02
Repository: couchdb-documentation
Updated Branches:
refs/heads/master 2d448159e -> 1957f02cf
Add material describing selector objects as part of a replication document.
Project: http://git-wip-us.apache.org/repos/asf/couchdb-documentation/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-documentation/commit/c92f59ce
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-documentation/tree/c92f59ce
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-documentation/diff/c92f59ce
Branch: refs/heads/master
Commit: c92f59ceee622ef64a658f0eb6c7f643539aff76
Parents: 34984e8
Author: Adrian Warman <wa...@gmail.com>
Authored: Tue Oct 18 13:09:53 2016 +0100
Committer: Adrian Warman <wa...@gmail.com>
Committed: Tue Oct 18 13:09:53 2016 +0100
----------------------------------------------------------------------
src/api/database/changes.rst | 2 +-
src/json-structure.rst | 70 ++++++++++++++++++++-----------------
src/replication/intro.rst | 26 ++++++++++----
src/replication/replicator.rst | 27 ++++++++++++++
4 files changed, 85 insertions(+), 40 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/couchdb-documentation/blob/c92f59ce/src/api/database/changes.rst
----------------------------------------------------------------------
diff --git a/src/api/database/changes.rst b/src/api/database/changes.rst
index 2ff1bc3..70cb89b 100644
--- a/src/api/database/changes.rst
+++ b/src/api/database/changes.rst
@@ -477,7 +477,7 @@ This filter accepts only changes for documents which match a specified
selector, defined using the same :ref:`selector
syntax <find/selectors>` used for :ref:`_find <api/db/_find>`.
-This is more significantly more efficient than using a JavaScript filter
+This is significantly more efficient than using a JavaScript filter
function and is the recommended option if filtering on document attributes only.
Note that, unlike JavaScript filters, selectors do not have access to the
http://git-wip-us.apache.org/repos/asf/couchdb-documentation/blob/c92f59ce/src/json-structure.rst
----------------------------------------------------------------------
diff --git a/src/json-structure.rst b/src/json-structure.rst
index 9711ae9..d24ecd9 100644
--- a/src/json-structure.rst
+++ b/src/json-structure.rst
@@ -242,39 +242,43 @@ List of Active Tasks
Replication Settings
====================
-+--------------------------------+---------------------------------------------+
-| Field | Description |
-+================================+=============================================+
-| source | Source database name or URL |
-+--------------------------------+---------------------------------------------+
-| target | Target database name or URL |
-+--------------------------------+---------------------------------------------+
-| create_target (optional) | Creates the target database |
-+--------------------------------+---------------------------------------------+
-| continuous (optional) | Configure the replication to be continuous |
-+--------------------------------+---------------------------------------------+
-| cancel (optional) | Cancels the replication |
-+--------------------------------+---------------------------------------------+
-| doc_ids (optional) | Array of document IDs to be synchronized |
-+--------------------------------+---------------------------------------------+
-| proxy (optional) | Address of a proxy server through which |
-| | replication should occur |
-+--------------------------------+---------------------------------------------+
-| since_seq (optional) | Sequence from which the replication should |
-| | start |
-+--------------------------------+---------------------------------------------+
-| filter (optional) | name of the filter function in the form of |
-| | ``ddoc/myfilter`` |
-+--------------------------------+---------------------------------------------+
-| query_params (optional) | Query parameter that are passed to the |
-| | filter function; the value should be a |
-| | document containing parameters as members |
-+--------------------------------+---------------------------------------------+
-| use_checkpoints (optional) | Whether to use replication checkpoints |
-| | or not |
-+--------------------------------+---------------------------------------------+
-| checkpoint_interval (optional) | Specifies the checkpoint interval in ms. |
-+--------------------------------+---------------------------------------------+
++--------------------------------+---------------------------------------------------+
+| Field | Description |
++================================+===================================================+
+| source | Source database name or URL |
++--------------------------------+---------------------------------------------------+
+| target | Target database name or URL |
++--------------------------------+---------------------------------------------------+
+| cancel (optional) | Cancels the replication |
++--------------------------------+---------------------------------------------------+
+| checkpoint_interval (optional) | Specifies the checkpoint interval in ms. |
++--------------------------------+---------------------------------------------------+
+| continuous (optional) | Configure the replication to be continuous |
++--------------------------------+---------------------------------------------------+
+| create_target (optional) | Creates the target database |
++--------------------------------+---------------------------------------------------+
+| doc_ids (optional) | Array of document IDs to be synchronized |
++--------------------------------+---------------------------------------------------+
+| filter (optional) | name of the filter function in the form of |
+| | ``ddoc/myfilter`` |
++--------------------------------+---------------------------------------------------+
+| proxy (optional) | Address of a proxy server through which |
+| | replication should occur |
++--------------------------------+---------------------------------------------------+
+| query_params (optional) | Query parameter that are passed to the |
+| | filter function; the value should be a |
+| | document containing parameters as members |
++--------------------------------+---------------------------------------------------+
+| selector (optional) | Select the documents included in the replication. |
+| | This option provides performance benefits |
+| | compared with using the ``filter`` option. |
++--------------------------------+---------------------------------------------------+
+| since_seq (optional) | Sequence from which the replication should |
+| | start |
++--------------------------------+---------------------------------------------------+
+| use_checkpoints (optional) | Whether to use replication checkpoints |
+| | or not |
++--------------------------------+---------------------------------------------------+
.. _replication-status:
http://git-wip-us.apache.org/repos/asf/couchdb-documentation/blob/c92f59ce/src/replication/intro.rst
----------------------------------------------------------------------
diff --git a/src/replication/intro.rst b/src/replication/intro.rst
index a63610d..1a3f08d 100644
--- a/src/replication/intro.rst
+++ b/src/replication/intro.rst
@@ -73,13 +73,27 @@ B already exists in A and will wait for further changes.
Controlling which Documents to Replicate
========================================
-There are two ways for controlling which documents are replicated, and which
-are skipped. *Local* documents are never replicated (see :ref:`api/local`).
+There are three options for controlling which documents are replicated,
+and which are skipped:
-Additionally, :ref:`filterfun` can be used in a replication (see
-:ref:`replication-settings`). The replication task will then evaluate
-the filter function for each document in the changes feed. The document will
-only be replicated if the filter returns `true`.
+1. Defining documents as being local.
+2. Using :ref:`selectorobj`.
+3. Using :ref:`filterfun`.
+
+Local documents are never replicated (see :ref:`api/local`).
+
+:ref:`selectorobj` can be included in a replication document (see
+:ref:`replication-settings`). A selector object contains a query expression
+that is used to test whether a document should be replicated.
+
+:ref:`filterfun` can be used in a replication (see
+:ref:`replication-settings`). The replication task evaluates
+the filter function for each document in the changes feed. The document is
+only replicated if the filter returns `true`.
+
+.. note::
+ Using a selector provides performance benefits when compared with using a
+ :ref:`filterfun`. You should use :ref:`selectorobj` where possible.
Migrating Data to Clients
=========================
http://git-wip-us.apache.org/repos/asf/couchdb-documentation/blob/c92f59ce/src/replication/replicator.rst
----------------------------------------------------------------------
diff --git a/src/replication/replicator.rst b/src/replication/replicator.rst
index a09a362..83f2a81 100644
--- a/src/replication/replicator.rst
+++ b/src/replication/replicator.rst
@@ -407,3 +407,30 @@ Example delegated replication document:
As stated before, the ``user_ctx`` property is optional for admins, while
being mandatory for regular (non-admin) users. When the roles property
of ``user_ctx`` is missing, it defaults to the empty list ``[]``.
+
+.. _selectorobj:
+
+Selector Objects
+================
+
+Including a Selector Object in the replication document enables you to
+use a query expression to determine if a document should be included in
+the replication.
+
+The selector specifies fields in the document, and provides an expression
+to evaluate with the field content or other data. If the expression resolves
+to ``true``, the document is replicated.
+
+The selector object must:
+
+- Be structured as valid JSON.
+- Contain a valid query expression.
+
+The syntax for a selector is the same as the
+:ref:`selectorsyntax <find/selectors>` used for :ref:`_find <api/db/_find>`.
+
+Using a selector is significantly more efficient than using a JavaScript
+filter function, and is the recommended option if filtering on document
+attributes only.
+
+
[3/3] documentation commit: updated refs/heads/master to 1957f02
Posted by va...@apache.org.
Merge branch 'pr/83'
Project: http://git-wip-us.apache.org/repos/asf/couchdb-documentation/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-documentation/commit/1957f02c
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-documentation/tree/1957f02c
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-documentation/diff/1957f02c
Branch: refs/heads/master
Commit: 1957f02cfacf968fb83ba3d8badb9625b2392434
Parents: 2d44815 b3e661b
Author: Nick Vatamaniuc <va...@apache.org>
Authored: Tue Oct 18 21:00:46 2016 -0400
Committer: Nick Vatamaniuc <va...@apache.org>
Committed: Tue Oct 18 21:00:46 2016 -0400
----------------------------------------------------------------------
src/api/database/changes.rst | 2 +-
src/json-structure.rst | 829 ++++++++++++++++++------------------
src/replication/intro.rst | 26 +-
src/replication/replicator.rst | 27 +-
4 files changed, 464 insertions(+), 420 deletions(-)
----------------------------------------------------------------------
[2/3] documentation commit: updated refs/heads/master to 1957f02
Posted by va...@apache.org.
Correct stylistic errors.
Project: http://git-wip-us.apache.org/repos/asf/couchdb-documentation/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-documentation/commit/b3e661b6
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-documentation/tree/b3e661b6
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-documentation/diff/b3e661b6
Branch: refs/heads/master
Commit: b3e661b68f568dbcefa9e50e528521cdc6c9f41d
Parents: c92f59c
Author: Adrian Warman <wa...@gmail.com>
Authored: Tue Oct 18 23:23:31 2016 +0100
Committer: Adrian Warman <wa...@gmail.com>
Committed: Tue Oct 18 23:23:31 2016 +0100
----------------------------------------------------------------------
src/json-structure.rst | 847 ++++++++++++++++++------------------
src/replication/replicator.rst | 4 +-
2 files changed, 425 insertions(+), 426 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/couchdb-documentation/blob/b3e661b6/src/json-structure.rst
----------------------------------------------------------------------
diff --git a/src/json-structure.rst b/src/json-structure.rst
index d24ecd9..5665486 100644
--- a/src/json-structure.rst
+++ b/src/json-structure.rst
@@ -20,359 +20,360 @@ that you can supply to CouchDB, or get in return to requests.
All Database Documents
======================
-+--------------------------------+---------------------------------------------+
-| Field | Description |
-+================================+=============================================+
-| total_rows | Number of documents in the database/view |
-+--------------------------------+---------------------------------------------+
-| offset | Offset where the document list started |
-+--------------------------------+---------------------------------------------+
-| update_seq (optional) | Current update sequence for the database |
-+--------------------------------+---------------------------------------------+
-| rows [array] | Array of document object |
-+--------------------------------+---------------------------------------------+
++-----------------------+------------------------------------------+
+| Field | Description |
++=======================+==========================================+
+| total_rows | Number of documents in the database/view |
++-----------------------+------------------------------------------+
+| offset | Offset where the document list started |
++-----------------------+------------------------------------------+
+| update_seq (optional) | Current update sequence for the database |
++-----------------------+------------------------------------------+
+| rows [array] | Array of document object |
++-----------------------+------------------------------------------+
Bulk Document Response
======================
-+--------------------------------+---------------------------------------------+
-| Field | Description |
-+================================+=============================================+
-| docs [array] | Bulk Docs Returned Documents |
-+--------------------------------+---------------------------------------------+
-| id | Document ID |
-+--------------------------------+---------------------------------------------+
-| error | Error type |
-+--------------------------------+---------------------------------------------+
-| reason | Error string with extended reason |
-+--------------------------------+---------------------------------------------+
++--------------+-----------------------------------+
+| Field | Description |
++==============+===================================+
+| docs [array] | Bulk Docs Returned Documents |
++--------------+-----------------------------------+
+| id | Document ID |
++--------------+-----------------------------------+
+| error | Error type |
++--------------+-----------------------------------+
+| reason | Error string with extended reason |
++--------------+-----------------------------------+
Bulk Documents
==============
-+--------------------------------+---------------------------------------------+
-| Field | Description |
-+================================+=============================================+
-| docs [array] | Bulk Documents Document |
-+--------------------------------+---------------------------------------------+
-| _id (optional) | Document ID |
-+--------------------------------+---------------------------------------------+
-| _rev (optional) | Revision ID (when updating an existing |
-| | document) |
-+--------------------------------+---------------------------------------------+
-| _deleted (optional) | Whether the document should be deleted |
-+--------------------------------+---------------------------------------------+
++---------------------+----------------------------------------+
+| Field | Description |
++=====================+========================================+
+| docs [array] | Bulk Documents Document |
++---------------------+----------------------------------------+
+| _id (optional) | Document ID |
++---------------------+----------------------------------------+
+| _rev (optional) | Revision ID (when updating an existing |
+| | document) |
++---------------------+----------------------------------------+
+| _deleted (optional) | Whether the document should be deleted |
++---------------------+----------------------------------------+
Changes information for a database
==================================
-+--------------------------------+---------------------------------------------+
-| Field | Description |
-+================================+=============================================+
-| last_seq | Last update sequence |
-+--------------------------------+---------------------------------------------+
-| pending | Count of remaining items in the feed |
-+--------------------------------+---------------------------------------------+
-| results [array] | Changes made to a database |
-+--------------------------------+---------------------------------------------+
-| seq | Update sequence |
-+--------------------------------+---------------------------------------------+
-| id | Document ID |
-+--------------------------------+---------------------------------------------+
-| changes [array] | List of changes, field-by-field, for this |
-| | document |
-+--------------------------------+---------------------------------------------+
++-----------------+-------------------------------------------+
+| Field | Description |
++=================+===========================================+
+| last_seq | Last update sequence |
++-----------------+-------------------------------------------+
+| pending | Count of remaining items in the feed |
++-----------------+-------------------------------------------+
+| results [array] | Changes made to a database |
++-----------------+-------------------------------------------+
+| seq | Update sequence |
++-----------------+-------------------------------------------+
+| id | Document ID |
++-----------------+-------------------------------------------+
+| changes [array] | List of changes, field-by-field, for this |
+| | document |
++-----------------+-------------------------------------------+
CouchDB Document
================
-+--------------------------------+---------------------------------------------+
-| Field | Description |
-+================================+=============================================+
-| _id (optional) | Document ID |
-+--------------------------------+---------------------------------------------+
-| _rev (optional) | Revision ID (when updating an existing |
-| | document) |
-+--------------------------------+---------------------------------------------+
++-----------------+----------------------------------------+
+| Field | Description |
++=================+========================================+
+| _id (optional) | Document ID |
++-----------------+----------------------------------------+
+| _rev (optional) | Revision ID (when updating an existing |
+| | document) |
++-----------------+----------------------------------------+
CouchDB Error Status
====================
-+--------------------------------+---------------------------------------------+
-| Field | Description |
-+================================+=============================================+
-| id | Document ID |
-+--------------------------------+---------------------------------------------+
-| error | Error type |
-+--------------------------------+---------------------------------------------+
-| reason | Error string with extended reason |
-+--------------------------------+---------------------------------------------+
++--------+-----------------------------------+
+| Field | Description |
++========+===================================+
+| id | Document ID |
++--------+-----------------------------------+
+| error | Error type |
++--------+-----------------------------------+
+| reason | Error string with extended reason |
++--------+-----------------------------------+
.. _dbinfo_object:
CouchDB database information object
===================================
-+--------------------------------+---------------------------------------------+
-| Field | Description |
-+================================+=============================================+
-| db_name | The name of the database. |
-+--------------------------------+---------------------------------------------+
-| committed_update_seq | The number of committed updates. |
-+--------------------------------+---------------------------------------------+
-| doc_count | The number of documents in the database. |
-+--------------------------------+---------------------------------------------+
-| doc_del_count | The number of deleted documents. |
-+--------------------------------+---------------------------------------------+
-| compact_running | Set to true if the database compaction |
-| | routine is operating on this database. |
-+--------------------------------+---------------------------------------------+
-| disk_format_version | The version of the physical format used for |
-| | the data when it is stored on hard disk. |
-+--------------------------------+---------------------------------------------+
-| disk_size | Size in bytes of the data as stored on disk.|
-| | View indexes are not included in the |
-| | calculation. |
-+--------------------------------+---------------------------------------------+
-| instance_start_time | Timestamp indicating when the database was |
-| | opened, expressed in microseconds since the |
-| | epoch. |
-+--------------------------------+---------------------------------------------+
-| purge_seq | The number of purge operations on the |
-| | database. |
-+--------------------------------+---------------------------------------------+
-| update_seq | The current number of updates made in the |
-| | database. |
-+--------------------------------+---------------------------------------------+
++----------------------+----------------------------------------------+
+| Field | Description |
++======================+==============================================+
+| db_name | The name of the database. |
++----------------------+----------------------------------------------+
+| committed_update_seq | The number of committed updates. |
++----------------------+----------------------------------------------+
+| doc_count | The number of documents in the database. |
++----------------------+----------------------------------------------+
+| doc_del_count | The number of deleted documents. |
++----------------------+----------------------------------------------+
+| compact_running | Set to true if the database compaction |
+| | routine is operating on this database. |
++----------------------+----------------------------------------------+
+| disk_format_version | The version of the physical format used for |
+| | the data when it is stored on hard disk. |
++----------------------+----------------------------------------------+
+| disk_size | Size in bytes of the data as stored on disk. |
+| | View indexes are not included in the |
+| | calculation. |
++----------------------+----------------------------------------------+
+| instance_start_time | Timestamp indicating when the database was |
+| | opened, expressed in microseconds since the |
+| | epoch. |
++----------------------+----------------------------------------------+
+| purge_seq | The number of purge operations on the |
+| | database. |
++----------------------+----------------------------------------------+
+| update_seq | The current number of updates made in the |
+| | database. |
++----------------------+----------------------------------------------+
Design Document
===============
-+--------------------------------+---------------------------------------------+
-| Field | Description |
-+================================+=============================================+
-| _id | Design Document ID |
-+--------------------------------+---------------------------------------------+
-| _rev | Design Document Revision |
-+--------------------------------+---------------------------------------------+
-| views | View |
-+--------------------------------+---------------------------------------------+
-| viewname | View Definition |
-+--------------------------------+---------------------------------------------+
-| map | Map Function for View |
-+--------------------------------+---------------------------------------------+
-| reduce (optional) | Reduce Function for View |
-+--------------------------------+---------------------------------------------+
++-------------------+--------------------------+
+| Field | Description |
++===================+==========================+
+| _id | Design Document ID |
++-------------------+--------------------------+
+| _rev | Design Document Revision |
++-------------------+--------------------------+
+| views | View |
++-------------------+--------------------------+
+| viewname | View Definition |
++-------------------+--------------------------+
+| map | Map Function for View |
++-------------------+--------------------------+
+| reduce (optional) | Reduce Function for View |
++-------------------+--------------------------+
Design Document Information
===========================
-+--------------------------------+---------------------------------------------+
-| Field | Description |
-+================================+=============================================+
-| name | Name/ID of Design Document |
-+--------------------------------+---------------------------------------------+
-| view_index | View Index |
-+--------------------------------+---------------------------------------------+
-| compact_running | Indicates whether a compaction routine is |
-| | currently running on the view |
-+--------------------------------+---------------------------------------------+
-| disk_size | Size in bytes of the view as stored on disk |
-+--------------------------------+---------------------------------------------+
-| language | Language for the defined views |
-+--------------------------------+---------------------------------------------+
-| purge_seq | The purge sequence that has been processed |
-+--------------------------------+---------------------------------------------+
-| signature | MD5 signature of the views for the design |
-| | document |
-+--------------------------------+---------------------------------------------+
-| update_seq | The update sequence of the corresponding |
-| | database that has been indexed |
-+--------------------------------+---------------------------------------------+
-| updater_running | Indicates if the view is currently being |
-| | updated |
-+--------------------------------+---------------------------------------------+
-| waiting_clients | Number of clients waiting on views from this|
-| | design document |
-+--------------------------------+---------------------------------------------+
-| waiting_commit | Indicates if there are outstanding commits |
-| | to the underlying database that need to |
-| | processed |
-+--------------------------------+---------------------------------------------+
++-----------------+----------------------------------------------+
+| Field | Description |
++=================+==============================================+
+| name | Name/ID of Design Document |
++-----------------+----------------------------------------------+
+| view_index | View Index |
++-----------------+----------------------------------------------+
+| compact_running | Indicates whether a compaction routine is |
+| | currently running on the view |
++-----------------+----------------------------------------------+
+| disk_size | Size in bytes of the view as stored on disk |
++-----------------+----------------------------------------------+
+| language | Language for the defined views |
++-----------------+----------------------------------------------+
+| purge_seq | The purge sequence that has been processed |
++-----------------+----------------------------------------------+
+| signature | MD5 signature of the views for the design |
+| | document |
++-----------------+----------------------------------------------+
+| update_seq | The update sequence of the corresponding |
+| | database that has been indexed |
++-----------------+----------------------------------------------+
+| updater_running | Indicates if the view is currently being |
+| | updated |
++-----------------+----------------------------------------------+
+| waiting_clients | Number of clients waiting on views from this |
+| | design document |
++-----------------+----------------------------------------------+
+| waiting_commit | Indicates if there are outstanding commits |
+| | to the underlying database that need to |
+| | processed |
++-----------------+----------------------------------------------+
Document with Attachments
=========================
-+--------------------------------+---------------------------------------------+
-| Field | Description |
-+================================+=============================================+
-| _id (optional) | Document ID |
-+--------------------------------+---------------------------------------------+
-| _rev (optional) | Revision ID (when updating an existing |
-| | document) |
-+--------------------------------+---------------------------------------------+
-| _attachments (optional) | Document Attachment |
-+--------------------------------+---------------------------------------------+
-| filename | Attachment information |
-+--------------------------------+---------------------------------------------+
-| content_type | MIME Content type string |
-+--------------------------------+---------------------------------------------+
-| data | File attachment content, Base64 encoded |
-+--------------------------------+---------------------------------------------+
++-------------------------+-----------------------------------------+
+| Field | Description |
++=========================+=========================================+
+| _id (optional) | Document ID |
++-------------------------+-----------------------------------------+
+| _rev (optional) | Revision ID (when updating an existing |
+| | document) |
++-------------------------+-----------------------------------------+
+| _attachments (optional) | Document Attachment |
++-------------------------+-----------------------------------------+
+| filename | Attachment information |
++-------------------------+-----------------------------------------+
+| content_type | MIME Content type string |
++-------------------------+-----------------------------------------+
+| data | File attachment content, Base64 encoded |
++-------------------------+-----------------------------------------+
List of Active Tasks
====================
-+--------------------------------+---------------------------------------------+
-| Field | Description |
-+================================+=============================================+
-| tasks [array] | Active Tasks |
-+--------------------------------+---------------------------------------------+
-| pid | Process ID |
-+--------------------------------+---------------------------------------------+
-| status | Task status message |
-+--------------------------------+---------------------------------------------+
-| task | Task name |
-+--------------------------------+---------------------------------------------+
-| type | Operation Type |
-+--------------------------------+---------------------------------------------+
++---------------+---------------------+
+| Field | Description |
++===============+=====================+
+| tasks [array] | Active Tasks |
++---------------+---------------------+
+| pid | Process ID |
++---------------+---------------------+
+| status | Task status message |
++---------------+---------------------+
+| task | Task name |
++---------------+---------------------+
+| type | Operation Type |
++---------------+---------------------+
.. _replication-settings:
Replication Settings
====================
-+--------------------------------+---------------------------------------------------+
-| Field | Description |
-+================================+===================================================+
-| source | Source database name or URL |
-+--------------------------------+---------------------------------------------------+
-| target | Target database name or URL |
-+--------------------------------+---------------------------------------------------+
-| cancel (optional) | Cancels the replication |
-+--------------------------------+---------------------------------------------------+
-| checkpoint_interval (optional) | Specifies the checkpoint interval in ms. |
-+--------------------------------+---------------------------------------------------+
-| continuous (optional) | Configure the replication to be continuous |
-+--------------------------------+---------------------------------------------------+
-| create_target (optional) | Creates the target database |
-+--------------------------------+---------------------------------------------------+
-| doc_ids (optional) | Array of document IDs to be synchronized |
-+--------------------------------+---------------------------------------------------+
-| filter (optional) | name of the filter function in the form of |
-| | ``ddoc/myfilter`` |
-+--------------------------------+---------------------------------------------------+
-| proxy (optional) | Address of a proxy server through which |
-| | replication should occur |
-+--------------------------------+---------------------------------------------------+
-| query_params (optional) | Query parameter that are passed to the |
-| | filter function; the value should be a |
-| | document containing parameters as members |
-+--------------------------------+---------------------------------------------------+
-| selector (optional) | Select the documents included in the replication. |
-| | This option provides performance benefits |
-| | compared with using the ``filter`` option. |
-+--------------------------------+---------------------------------------------------+
-| since_seq (optional) | Sequence from which the replication should |
-| | start |
-+--------------------------------+---------------------------------------------------+
-| use_checkpoints (optional) | Whether to use replication checkpoints |
-| | or not |
-+--------------------------------+---------------------------------------------------+
-
-.. _replication-status:
-
-Replication Status
-==================
-
+--------------------------------+---------------------------------------------+
| Field | Description |
+================================+=============================================+
-| ok | Replication status |
-+--------------------------------+---------------------------------------------+
-| session_id | Unique session ID |
-+--------------------------------+---------------------------------------------+
-| source_last_seq | Last sequence number read from the source |
-| | database |
+| source | Source database name or URL. |
+--------------------------------+---------------------------------------------+
-| history [array] | Replication History |
+| target | Target database name or URL. |
+--------------------------------+---------------------------------------------+
-| session_id | Session ID for this replication operation |
+| cancel (optional) | Cancels the replication. |
+--------------------------------+---------------------------------------------+
-| recorded_seq | Last recorded sequence number |
+| checkpoint_interval (optional) | Specifies the checkpoint interval in ms. |
+--------------------------------+---------------------------------------------+
-| docs_read | Number of documents read |
+| continuous (optional) | Configure the replication to be continuous. |
+--------------------------------+---------------------------------------------+
-| docs_written | Number of documents written to target |
+| create_target (optional) | Creates the target database. |
+--------------------------------+---------------------------------------------+
-| doc_write_failures | Number of document write failures |
+| doc_ids (optional) | Array of document IDs to be synchronized. |
+--------------------------------+---------------------------------------------+
-| start_time | Date/Time replication operation started |
+| filter (optional) | name of the filter function in the form of |
+| | ``ddoc/myfilter``. |
+--------------------------------+---------------------------------------------+
-| start_last_seq | First sequence number in changes stream |
+| proxy (optional) | Address of a proxy server through which |
+| | replication should occur. |
+--------------------------------+---------------------------------------------+
-| end_time | Date/Time replication operation completed |
+| query_params (optional) | Query parameter that are passed to the |
+| | filter function; the value should be a |
+| | document containing parameters as members. |
+--------------------------------+---------------------------------------------+
-| end_last_seq | Last sequence number in changes stream |
+| selector (optional) | Select the documents included in the |
+| | replication. This option provides |
+| | performance benefits compared with using |
+| | the ``filter`` option. |
+--------------------------------+---------------------------------------------+
-| missing_checked | Number of missing documents checked |
+| since_seq (optional) | Sequence from which the replication should |
+| | start. |
+--------------------------------+---------------------------------------------+
-| missing_found | Number of missing documents found |
+| use_checkpoints (optional) | Whether to use replication checkpoints |
+| | or not. |
+--------------------------------+---------------------------------------------+
+.. _replication-status:
+
+Replication Status
+==================
+
++--------------------+-------------------------------------------+
+| Field | Description |
++====================+===========================================+
+| ok | Replication status |
++--------------------+-------------------------------------------+
+| session_id | Unique session ID |
++--------------------+-------------------------------------------+
+| source_last_seq | Last sequence number read from the source |
+| | database |
++--------------------+-------------------------------------------+
+| history [array] | Replication History |
++--------------------+-------------------------------------------+
+| session_id | Session ID for this replication operation |
++--------------------+-------------------------------------------+
+| recorded_seq | Last recorded sequence number |
++--------------------+-------------------------------------------+
+| docs_read | Number of documents read |
++--------------------+-------------------------------------------+
+| docs_written | Number of documents written to target |
++--------------------+-------------------------------------------+
+| doc_write_failures | Number of document write failures |
++--------------------+-------------------------------------------+
+| start_time | Date/Time replication operation started |
++--------------------+-------------------------------------------+
+| start_last_seq | First sequence number in changes stream |
++--------------------+-------------------------------------------+
+| end_time | Date/Time replication operation completed |
++--------------------+-------------------------------------------+
+| end_last_seq | Last sequence number in changes stream |
++--------------------+-------------------------------------------+
+| missing_checked | Number of missing documents checked |
++--------------------+-------------------------------------------+
+| missing_found | Number of missing documents found |
++--------------------+-------------------------------------------+
+
.. _request_object:
Request object
==============
-+--------------------------------+---------------------------------------------+
-| Field | Description |
-+================================+=============================================+
-| body | Request body data as `string`. |
-| | If the request method is `GET` this field |
-| | contains the value ``"undefined"``. If the |
-| | method is `DELETE` or `HEAD` the value is |
-| | ``""`` (empty string). |
-+--------------------------------+---------------------------------------------+
-| cookie | Cookies `object`. |
-+--------------------------------+---------------------------------------------+
-| form | Form data `object`. |
-| | Contains the decoded body as key-value |
-| | pairs if the `Content-Type` header was |
-| | ``application/x-www-form-urlencoded``. |
-+--------------------------------+---------------------------------------------+
-| headers | Request headers `object`. |
-+--------------------------------+---------------------------------------------+
-| id | Requested document id `string` if it was |
-| | specified or ``null`` otherwise. |
-+--------------------------------+---------------------------------------------+
-| info | :ref:`Database information <dbinfo_object>` |
-+--------------------------------+---------------------------------------------+
-| method | Request method as `string` or `array`. |
-| | String value is a method as one of: `HEAD`, |
-| | `GET`, `POST`, `PUT`, `DELETE`, `OPTIONS`, |
-| | and `TRACE`. Otherwise it will be |
-| | represented as an array of char codes. |
-+--------------------------------+---------------------------------------------+
-| path | List of requested path sections. |
-+--------------------------------+---------------------------------------------+
-| peer | Request source IP address. |
-+--------------------------------+---------------------------------------------+
-| query | URL query parameters `object`. |
-| | Note that multiple keys are not supported |
-| | and the last key value suppresses others. |
-+--------------------------------+---------------------------------------------+
-| requested_path | List of actual requested path section. |
-+--------------------------------+---------------------------------------------+
-| raw_path | Raw requested path `string`. |
-+--------------------------------+---------------------------------------------+
-| secObj | :ref:`security_object`. |
-+--------------------------------+---------------------------------------------+
-| userCtx | :ref:`userctx_object`. |
-+--------------------------------+---------------------------------------------+
-| uuid | Generated UUID by a specified algorithm in |
-| | the config file. |
-+--------------------------------+---------------------------------------------+
++----------------+---------------------------------------------+
+| Field | Description |
++================+=============================================+
+| body | Request body data as `string`. |
+| | If the request method is `GET` this field |
+| | contains the value ``"undefined"``. If the |
+| | method is `DELETE` or `HEAD` the value is |
+| | ``""`` (empty string). |
++----------------+---------------------------------------------+
+| cookie | Cookies `object`. |
++----------------+---------------------------------------------+
+| form | Form data `object`. |
+| | Contains the decoded body as key-value |
+| | pairs if the `Content-Type` header was |
+| | ``application/x-www-form-urlencoded``. |
++----------------+---------------------------------------------+
+| headers | Request headers `object`. |
++----------------+---------------------------------------------+
+| id | Requested document id `string` if it was |
+| | specified or ``null`` otherwise. |
++----------------+---------------------------------------------+
+| info | :ref:`Database information <dbinfo_object>` |
++----------------+---------------------------------------------+
+| method | Request method as `string` or `array`. |
+| | String value is a method as one of: `HEAD`, |
+| | `GET`, `POST`, `PUT`, `DELETE`, `OPTIONS`, |
+| | and `TRACE`. Otherwise it will be |
+| | represented as an array of char codes. |
++----------------+---------------------------------------------+
+| path | List of requested path sections. |
++----------------+---------------------------------------------+
+| peer | Request source IP address. |
++----------------+---------------------------------------------+
+| query | URL query parameters `object`. |
+| | Note that multiple keys are not supported |
+| | and the last key value suppresses others. |
++----------------+---------------------------------------------+
+| requested_path | List of actual requested path section. |
++----------------+---------------------------------------------+
+| raw_path | Raw requested path `string`. |
++----------------+---------------------------------------------+
+| secObj | :ref:`security_object`. |
++----------------+---------------------------------------------+
+| userCtx | :ref:`userctx_object`. |
++----------------+---------------------------------------------+
+| uuid | Generated UUID by a specified algorithm in |
+| | the config file. |
++----------------+---------------------------------------------+
.. code-block:: javascript
@@ -457,71 +458,71 @@ Request object
Request2 object
===============
-+--------------------------------+---------------------------------------------+
-| Field | Description |
-+================================+=============================================+
-| body | Request body data as `string`. |
-| | If the request method is `GET` this field |
-| | contains the value ``"undefined"``. If the |
-| | method is `DELETE` or `HEAD` the value is |
-| | ``""`` (empty string). |
-+--------------------------------+---------------------------------------------+
-| cookie | Cookies `object`. |
-+--------------------------------+---------------------------------------------+
-| headers | Request headers `object`. |
-+--------------------------------+---------------------------------------------+
-| method | Request method as `string` or `array`. |
-| | String value is a method as one of: `HEAD`, |
-| | `GET`, `POST`, `PUT`, `DELETE`, `OPTIONS`, |
-| | and `TRACE`. Otherwise it will be |
-| | represented as an array of char codes. |
-+--------------------------------+---------------------------------------------+
-| path | List of requested path sections. |
-+--------------------------------+---------------------------------------------+
-| peer | Request source IP address. |
-+--------------------------------+---------------------------------------------+
-| query | URL query parameters `object`. |
-| | Note that multiple keys are not supported |
-| | and the last key value suppresses others. |
-+--------------------------------+---------------------------------------------+
-| requested_path | List of actual requested path section. |
-+--------------------------------+---------------------------------------------+
-| raw_path | Raw requested path `string`. |
-+--------------------------------+---------------------------------------------+
-| secObj | :ref:`security_object`. |
-+--------------------------------+---------------------------------------------+
-| userCtx | :ref:`userctx_object`. |
-+--------------------------------+---------------------------------------------+
++----------------+---------------------------------------------+
+| Field | Description |
++================+=============================================+
+| body | Request body data as `string`. |
+| | If the request method is `GET` this field |
+| | contains the value ``"undefined"``. If the |
+| | method is `DELETE` or `HEAD` the value is |
+| | ``""`` (empty string). |
++----------------+---------------------------------------------+
+| cookie | Cookies `object`. |
++----------------+---------------------------------------------+
+| headers | Request headers `object`. |
++----------------+---------------------------------------------+
+| method | Request method as `string` or `array`. |
+| | String value is a method as one of: `HEAD`, |
+| | `GET`, `POST`, `PUT`, `DELETE`, `OPTIONS`, |
+| | and `TRACE`. Otherwise it will be |
+| | represented as an array of char codes. |
++----------------+---------------------------------------------+
+| path | List of requested path sections. |
++----------------+---------------------------------------------+
+| peer | Request source IP address. |
++----------------+---------------------------------------------+
+| query | URL query parameters `object`. |
+| | Note that multiple keys are not supported |
+| | and the last key value suppresses others. |
++----------------+---------------------------------------------+
+| requested_path | List of actual requested path section. |
++----------------+---------------------------------------------+
+| raw_path | Raw requested path `string`. |
++----------------+---------------------------------------------+
+| secObj | :ref:`security_object`. |
++----------------+---------------------------------------------+
+| userCtx | :ref:`userctx_object`. |
++----------------+---------------------------------------------+
.. _response_object:
Response object
===============
-+--------------------------------+---------------------------------------------+
-| Field | Description |
-+================================+=============================================+
-| code | HTTP status code `number`. |
-+--------------------------------+---------------------------------------------+
-| json | JSON encodable `object`. |
-| | Implicitly sets `Content-Type` header as |
-| | ``application/json``. |
-+--------------------------------+---------------------------------------------+
-| body | Raw response text `string`. |
-| | Implicitly sets `Content-Type` header as |
-| | ``text/html; charset=utf-8``. |
-+--------------------------------+---------------------------------------------+
-| base64 | Base64 encoded `string`. |
-| | Implicitly sets `Content-Type` header as |
-| | ``application/binary``. |
-+--------------------------------+---------------------------------------------+
-| headers | Response headers `object`. |
-| | `Content-Type` header from this object |
-| | overrides any implicitly assigned one. |
-+--------------------------------+---------------------------------------------+
-| stop | `boolean` signal to stop iteration over |
-| | view result rows (for list functions only) |
-+--------------------------------+---------------------------------------------+
++---------+--------------------------------------------+
+| Field | Description |
++=========+============================================+
+| code | HTTP status code `number`. |
++---------+--------------------------------------------+
+| json | JSON encodable `object`. |
+| | Implicitly sets `Content-Type` header as |
+| | ``application/json``. |
++---------+--------------------------------------------+
+| body | Raw response text `string`. |
+| | Implicitly sets `Content-Type` header as |
+| | ``text/html; charset=utf-8``. |
++---------+--------------------------------------------+
+| base64 | Base64 encoded `string`. |
+| | Implicitly sets `Content-Type` header as |
+| | ``application/binary``. |
++---------+--------------------------------------------+
+| headers | Response headers `object`. |
+| | `Content-Type` header from this object |
+| | overrides any implicitly assigned one. |
++---------+--------------------------------------------+
+| stop | `boolean` signal to stop iteration over |
+| | view result rows (for list functions only) |
++---------+--------------------------------------------+
.. warning::
The ``body``, ``base64`` and ``json`` object keys are overlapping each other
@@ -537,84 +538,84 @@ Response object
Returned CouchDB Document with Detailed Revision Info
=====================================================
-+--------------------------------+---------------------------------------------+
-| Field | Description |
-+================================+=============================================+
-| _id (optional) | Document ID |
-+--------------------------------+---------------------------------------------+
-| _rev (optional) | Revision ID (when updating an existing |
-| | document) |
-+--------------------------------+---------------------------------------------+
-| _revs_info [array] | CouchDB document extended revision info |
-+--------------------------------+---------------------------------------------+
-| rev | Full revision string |
-+--------------------------------+---------------------------------------------+
-| status | Status of the revision |
-+--------------------------------+---------------------------------------------+
++--------------------+-----------------------------------------+
+| Field | Description |
++====================+=========================================+
+| _id (optional) | Document ID |
++--------------------+-----------------------------------------+
+| _rev (optional) | Revision ID (when updating an existing |
+| | document) |
++--------------------+-----------------------------------------+
+| _revs_info [array] | CouchDB document extended revision info |
++--------------------+-----------------------------------------+
+| rev | Full revision string |
++--------------------+-----------------------------------------+
+| status | Status of the revision |
++--------------------+-----------------------------------------+
Returned CouchDB Document with Revision Info
============================================
-+--------------------------------+---------------------------------------------+
-| Field | Description |
-+================================+=============================================+
-| _id (optional) | Document ID |
-+--------------------------------+---------------------------------------------+
-| _rev (optional) | Revision ID (when updating an existing |
-| | document) |
-+--------------------------------+---------------------------------------------+
-| _revisions | CouchDB document revisions |
-+--------------------------------+---------------------------------------------+
-| ids [array] | Array of valid revision IDs, in reverse |
-| | order (latest first) |
-+--------------------------------+---------------------------------------------+
-| start | Prefix number for the latest revision |
-+--------------------------------+---------------------------------------------+
++-----------------+-----------------------------------------+
+| Field | Description |
++=================+=========================================+
+| _id (optional) | Document ID |
++-----------------+-----------------------------------------+
+| _rev (optional) | Revision ID (when updating an existing |
+| | document) |
++-----------------+-----------------------------------------+
+| _revisions | CouchDB document revisions |
++-----------------+-----------------------------------------+
+| ids [array] | Array of valid revision IDs, in reverse |
+| | order (latest first) |
++-----------------+-----------------------------------------+
+| start | Prefix number for the latest revision |
++-----------------+-----------------------------------------+
Returned Document with Attachments
==================================
-+--------------------------------+---------------------------------------------+
-| Field | Description |
-+================================+=============================================+
-| _id (optional) | Document ID |
-+--------------------------------+---------------------------------------------+
-| _rev (optional) | Revision ID (when updating an existing |
-| | document) |
-+--------------------------------+---------------------------------------------+
-| _attachments (optional) | Document attachment |
-+--------------------------------+---------------------------------------------+
-| filename | Attachment |
-+--------------------------------+---------------------------------------------+
-| stub | Indicates whether the attachment is a stub |
-+--------------------------------+---------------------------------------------+
-| content_type | MIME Content type string |
-+--------------------------------+---------------------------------------------+
-| length | Length (bytes) of the attachment data |
-+--------------------------------+---------------------------------------------+
-| revpos | Revision where this attachment exists |
-+--------------------------------+---------------------------------------------+
++-------------------------+--------------------------------------------+
+| Field | Description |
++=========================+============================================+
+| _id (optional) | Document ID |
++-------------------------+--------------------------------------------+
+| _rev (optional) | Revision ID (when updating an existing |
+| | document) |
++-------------------------+--------------------------------------------+
+| _attachments (optional) | Document attachment |
++-------------------------+--------------------------------------------+
+| filename | Attachment |
++-------------------------+--------------------------------------------+
+| stub | Indicates whether the attachment is a stub |
++-------------------------+--------------------------------------------+
+| content_type | MIME Content type string |
++-------------------------+--------------------------------------------+
+| length | Length (bytes) of the attachment data |
++-------------------------+--------------------------------------------+
+| revpos | Revision where this attachment exists |
++-------------------------+--------------------------------------------+
.. _security_object:
Security Object
===============
-+--------------------------------+---------------------------------------------+
-| Field | Description |
-+================================+=============================================+
-| admins | Roles/Users with admin privileges |
-+--------------------------------+---------------------------------------------+
-| roles [array] | List of roles with parent privilege |
-+--------------------------------+---------------------------------------------+
-| names [array] | List of users with parent privilege |
-+--------------------------------+---------------------------------------------+
-| members | Roles/Users with non-admin privileges |
-+--------------------------------+---------------------------------------------+
-| roles [array] | List of roles with parent privilege |
-+--------------------------------+---------------------------------------------+
-| names [array] | List of users with parent privilege |
-+--------------------------------+---------------------------------------------+
++---------------+---------------------------------------+
+| Field | Description |
++===============+=======================================+
+| admins | Roles/Users with admin privileges |
++---------------+---------------------------------------+
+| roles [array] | List of roles with parent privilege |
++---------------+---------------------------------------+
+| names [array] | List of users with parent privilege |
++---------------+---------------------------------------+
+| members | Roles/Users with non-admin privileges |
++---------------+---------------------------------------+
+| roles [array] | List of roles with parent privilege |
++---------------+---------------------------------------+
+| names [array] | List of users with parent privilege |
++---------------+---------------------------------------+
.. code-block:: javascript
@@ -639,16 +640,16 @@ Security Object
User Context Object
===================
-+--------------------------------+---------------------------------------------+
-| Field | Description |
-+================================+=============================================+
-| db | Database name in the context of the |
-| | provided operation. |
-+--------------------------------+---------------------------------------------+
-| name | User name. |
-+--------------------------------+---------------------------------------------+
-| roles | List of user roles. |
-+--------------------------------+---------------------------------------------+
++-------+-------------------------------------+
+| Field | Description |
++=======+=====================================+
+| db | Database name in the context of the |
+| | provided operation. |
++-------+-------------------------------------+
+| name | User name. |
++-------+-------------------------------------+
+| roles | List of user roles. |
++-------+-------------------------------------+
.. code-block:: javascript
@@ -665,13 +666,13 @@ User Context Object
View Head Information
=====================
-+--------------------------------+---------------------------------------------+
-| Field | Description |
-+================================+=============================================+
-| total_rows | Number of documents in the view |
-+--------------------------------+---------------------------------------------+
-| offset | Offset where the document list started |
-+--------------------------------+---------------------------------------------+
++------------+----------------------------------------+
+| Field | Description |
++============+========================================+
+| total_rows | Number of documents in the view |
++------------+----------------------------------------+
+| offset | Offset where the document list started |
++------------+----------------------------------------+
.. code-block:: javascript
http://git-wip-us.apache.org/repos/asf/couchdb-documentation/blob/b3e661b6/src/replication/replicator.rst
----------------------------------------------------------------------
diff --git a/src/replication/replicator.rst b/src/replication/replicator.rst
index 83f2a81..1db5c8f 100644
--- a/src/replication/replicator.rst
+++ b/src/replication/replicator.rst
@@ -249,7 +249,7 @@ The way to accomplish this is to first delete the old version and then insert
the new one.
Additional Replicator Databases
-================================
+===============================
Imagine replicator database (``_replicator``) has these two
documents which represent pull replications from servers A and B:
@@ -432,5 +432,3 @@ The syntax for a selector is the same as the
Using a selector is significantly more efficient than using a JavaScript
filter function, and is the recommended option if filtering on document
attributes only.
-
-