Options
All
  • Public
  • Public/Protected
  • All
Menu

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

Hierarchy

  • ReplicationDocument

Indexable

[propName: string]: any

ReplicationDocument accepts additional properties.

Index

Properties

Optional _attachments

_attachments?: export=.JsonObject

Schema for a map of attachment name to attachment metadata.

Optional _conflicts

_conflicts?: string[]

Schema for a list of document revision identifiers.

Optional _deleted

_deleted?: boolean

Deletion flag. Available if document was removed.

Optional _deleted_conflicts

_deleted_conflicts?: string[]

Schema for a list of document revision identifiers.

Optional _id

_id?: string

Document ID.

Optional _local_seq

_local_seq?: string

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

Optional _rev

_rev?: string

Schema for a document revision identifier.

Optional _revisions

_revisions?: export=.Revisions

Schema for list of revision information.

Optional _revs_info

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

Optional cancel

cancel?: boolean

Cancels the replication.

Optional checkpoint_interval

checkpoint_interval?: number

Defines replication checkpoint interval in milliseconds.

Optional connection_timeout

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.

Optional continuous

continuous?: boolean

Configure the replication to be continuous.

Optional create_target

create_target?: boolean

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

Optional create_target_params

Request parameters to use during target database creation.

Optional doc_ids

doc_ids?: string[]

Schema for a list of document IDs.

Optional filter

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.

Optional http_connections

http_connections?: number

Maximum number of HTTP connections per replication.

Optional query_params

query_params?: export=.JsonObject

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

Optional retries_per_request

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.

Optional selector

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.

Optional since_seq

since_seq?: string

Start the replication at a specific sequence value.

Optional socket_options

socket_options?: string

Replication socket options.

source

Schema for a replication source or target database.

Optional source_proxy

source_proxy?: string

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

target

Schema for a replication source or target database.

Optional target_proxy

target_proxy?: string

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

Optional use_checkpoints

use_checkpoints?: boolean

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

Optional user_ctx

user_ctx?: export=.UserContext

Schema for the user context of a session.

Optional worker_batch_size

worker_batch_size?: number

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

Optional worker_processes

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