Schema for a replication document. Note that selector, doc_ids, and filter are incompatible with each other.

Hierarchy

  • ReplicationDocument

Indexable

[propName: string]: any

Properties

_attachments?: export=.JsonObject

Schema for a map of attachment name to attachment metadata.

_conflicts?: string[]

Schema for a list of document revision identifiers.

_deleted?: boolean

Deletion flag. Available if document was removed.

_deleted_conflicts?: string[]

Schema for a list of document revision identifiers.

_id?: string

Document ID.

_local_seq?: string

Document's update sequence in current database. Available if requested with local_seq=true query parameter.

_rev?: string

Schema for a document revision identifier.

_revisions?: export=.Revisions

Schema for list of revision information.

Schema for a list of objects with information about local revisions and their status.

cancel?: boolean

Cancels the replication.

checkpoint_interval?: number

Defines replication checkpoint interval in milliseconds.

connection_timeout?: number

HTTP connection timeout per replication. Even for very fast/reliable networks it might need to be increased if a remote database is too busy.

continuous?: boolean

Configure the replication to be continuous.

create_target?: boolean

Creates the target database. Requires administrator privileges on target server.

Request parameters to use during target database creation.

doc_ids?: string[]

Schema for a list of document IDs.

filter?: string

The name of a filter function which is defined in a design document in the source database in {ddoc_id}/{filter} format. It determines which documents get replicated. Using the selector option provides performance benefits when compared with using the filter option. Use the selector option when possible.

http_connections?: number

Maximum number of HTTP connections per replication.

query_params?: export=.JsonObject

Schema for a map of string key value pairs, such as query parameters.

retries_per_request?: number

Number of times a replication request is retried. The requests are retried with a doubling exponential backoff starting at 0.25 seconds, with a cap at 5 minutes.

selector?: export=.JsonObject

JSON object describing criteria used to select documents. The selector specifies fields in the document, and provides an expression to evaluate with the field content or other data.

The selector object must:

  • Be structured as valid JSON.
  • Contain a valid query expression.

Using a selector is significantly more efficient than using a JavaScript filter function, and is the recommended option if filtering on document attributes only.

Elementary selector syntax requires you to specify one or more fields, and the corresponding values required for those fields. You can create more complex selector expressions by combining operators.

Operators are identified by the use of a dollar sign $ prefix in the name field.

There are two core types of operators in the selector syntax:

  • Combination operators: applied at the topmost level of selection. They are used to combine selectors. In addition to the common boolean operators ($and, $or, $not, $nor) there are three combination operators: $all, $elemMatch, and $allMatch. A combination operator takes a single argument. The argument is either another selector, or an array of selectors.
  • Condition operators: are specific to a field, and are used to evaluate the value stored in that field. For instance, the basic $eq operator matches when the specified field contains a value that is equal to the supplied argument.
  • Only equality operators such as $eq, $gt, $gte, $lt, and $lte (but not $ne) can be used as the basis of a query. You should include at least one of these in a selector.

For further reference see selector syntax.

since_seq?: string

Start the replication at a specific sequence value.

socket_options?: string

Replication socket options.

Schema for a replication source or target database.

source_proxy?: string

Address of a (http or socks5 protocol) proxy server through which replication with the source database should occur.

Schema for a replication source or target database.

target_proxy?: string

Address of a (http or socks5 protocol) proxy server through which replication with the target database should occur.

use_checkpoints?: boolean

Specify if checkpoints should be saved during replication. Using checkpoints means a replication can be efficiently resumed.

user_ctx?: export=.UserContext

Schema for the user context of a session.

worker_batch_size?: number

Controls how many documents are processed. After each batch a checkpoint is written so this controls how frequently checkpointing occurs.

worker_processes?: number

Controls how many separate processes will read from the changes manager and write to the target. A higher number can improve throughput.

Generated using TypeDoc